Mercurial > hg > orthanc-stone
diff Framework/Toolbox/DicomStructureSet.cpp @ 158:a053ca7fa5c6 wasm
LinearAlgebra toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 08:58:31 +0100 |
parents | a30ff4866a1e |
children | 0a73d76333db |
line wrap: on
line diff
--- a/Framework/Toolbox/DicomStructureSet.cpp Fri Feb 09 16:00:29 2018 +0100 +++ b/Framework/Toolbox/DicomStructureSet.cpp Wed Feb 14 08:58:31 2018 +0100 @@ -124,7 +124,7 @@ { std::string value; return (dataset.GetStringValue(value, tag) && - GeometryToolbox::ParseVector(target, value)); + LinearAlgebra::ParseVector(target, value)); } @@ -132,9 +132,9 @@ { if (hasSlice_) { - if (!GeometryToolbox::IsNear(GeometryToolbox::ProjectAlongNormal(v, geometry_.GetNormal()), - projectionAlongNormal_, - sliceThickness_ / 2.0 /* in mm */)) + if (!LinearAlgebra::IsNear(GeometryToolbox::ProjectAlongNormal(v, geometry_.GetNormal()), + projectionAlongNormal_, + sliceThickness_ / 2.0 /* in mm */)) { LOG(ERROR) << "This RT-STRUCT contains a point that is off the slice of its instance"; throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); @@ -203,8 +203,8 @@ double d = GeometryToolbox::ProjectAlongNormal(slice.GetOrigin(), geometry_.GetNormal()); - return (GeometryToolbox::IsNear(d, projectionAlongNormal_, - sliceThickness_ / 2.0)); + return (LinearAlgebra::IsNear(d, projectionAlongNormal_, + sliceThickness_ / 2.0)); } @@ -468,7 +468,7 @@ DICOM_TAG_CONTOUR_DATA)); Vector points; - if (!GeometryToolbox::ParseVector(points, slicesData) || + if (!LinearAlgebra::ParseVector(points, slicesData) || points.size() != 3 * countPoints) { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); @@ -497,7 +497,7 @@ const Structure& structure = GetStructure(index); Vector center; - GeometryToolbox::AssignVector(center, 0, 0, 0); + LinearAlgebra::AssignVector(center, 0, 0, 0); if (structure.polygons_.empty()) { return center; @@ -614,7 +614,7 @@ std::string s; Vector v; if (dataset.CopyToString(s, Orthanc::DICOM_TAG_SLICE_THICKNESS, false) && - GeometryToolbox::ParseVector(v, s) && + LinearAlgebra::ParseVector(v, s) && v.size() > 0) { thickness = v[0]; @@ -657,7 +657,7 @@ if (referencedSlices_.empty()) { Vector v; - GeometryToolbox::AssignVector(v, 0, 0, 1); + LinearAlgebra::AssignVector(v, 0, 0, 1); return v; } else