Mercurial > hg > orthanc-stone
diff Framework/Toolbox/Slice.cpp @ 714:d2c0e347ddc2
deprecating DicomFrameConverter
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 20 May 2019 16:26:34 +0200 |
parents | 2eeb5857eb43 |
children |
line wrap: on
line diff
--- a/Framework/Toolbox/Slice.cpp Mon May 20 15:44:01 2019 +0200 +++ b/Framework/Toolbox/Slice.cpp Mon May 20 16:26:34 2019 +0200 @@ -30,7 +30,7 @@ #include <boost/lexical_cast.hpp> -namespace OrthancStone +namespace Deprecated { static bool ParseDouble(double& target, const std::string& source) @@ -118,16 +118,16 @@ return false; } - if (!LinearAlgebra::IsCloseToZero(offset0)) + if (!OrthancStone::LinearAlgebra::IsCloseToZero(offset0)) { LOG(ERROR) << "Invalid syntax"; return false; } - geometry_ = CoordinateSystem3D(geometry_.GetOrigin() + z * geometry_.GetNormal(), - //+ 650 * geometry_.GetAxisX(), - geometry_.GetAxisX(), - geometry_.GetAxisY()); + geometry_ = OrthancStone::CoordinateSystem3D(geometry_.GetOrigin() + z * geometry_.GetNormal(), + //+ 650 * geometry_.GetAxisX(), + geometry_.GetAxisX(), + geometry_.GetAxisY()); thickness_ = offset1 - offset0; if (thickness_ < 0) @@ -185,19 +185,19 @@ converter_.ReadParameters(dataset); - GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dataset); + OrthancStone::GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dataset); std::string position, orientation; if (dataset.CopyToString(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) && dataset.CopyToString(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false)) { - geometry_ = CoordinateSystem3D(position, orientation); + geometry_ = OrthancStone::CoordinateSystem3D(position, orientation); bool ok = true; - switch (StringToSopClassUid(sopClassUid_)) + switch (OrthancStone::StringToSopClassUid(sopClassUid_)) { - case SopClassUid_RTDose: + case OrthancStone::SopClassUid_RTDose: type_ = Type_OrthancRawFrame; ok = ComputeRTDoseGeometry(dataset, frame); break; @@ -243,7 +243,7 @@ } - const CoordinateSystem3D& Slice::GetGeometry() const + const OrthancStone::CoordinateSystem3D& Slice::GetGeometry() const { if (type_ == Type_Invalid) { @@ -320,7 +320,7 @@ } - bool Slice::ContainsPlane(const CoordinateSystem3D& plane) const + bool Slice::ContainsPlane(const OrthancStone::CoordinateSystem3D& plane) const { if (type_ == Type_Invalid) { @@ -328,16 +328,16 @@ } bool opposite; - return (GeometryToolbox::IsParallelOrOpposite(opposite, - GetGeometry().GetNormal(), - plane.GetNormal()) && - LinearAlgebra::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()), - GetGeometry().ProjectAlongNormal(plane.GetOrigin()), - thickness_ / 2.0)); + return (OrthancStone::GeometryToolbox::IsParallelOrOpposite(opposite, + GetGeometry().GetNormal(), + plane.GetNormal()) && + OrthancStone::LinearAlgebra::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()), + GetGeometry().ProjectAlongNormal(plane.GetOrigin()), + thickness_ / 2.0)); } - void Slice::GetExtent(std::vector<Vector>& points) const + void Slice::GetExtent(std::vector<OrthancStone::Vector>& points) const { double sx = GetPixelSpacingX(); double sy = GetPixelSpacingY();