Mercurial > hg > orthanc-stone
diff Framework/Toolbox/CoordinateSystem3D.cpp @ 1161:19b1c8caade4 broker
fix sagittal geometry
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 19 Nov 2019 17:30:05 +0100 |
parents | ac88989817e3 |
children | 0ca50d275b9a |
line wrap: on
line diff
--- a/Framework/Toolbox/CoordinateSystem3D.cpp Tue Nov 19 12:52:07 2019 +0100 +++ b/Framework/Toolbox/CoordinateSystem3D.cpp Tue Nov 19 17:30:05 2019 +0100 @@ -241,4 +241,14 @@ return s; } + + CoordinateSystem3D CoordinateSystem3D::NormalizeCuttingPlane(const CoordinateSystem3D& plane) + { + double ox, oy; + plane.ProjectPoint(ox, oy, LinearAlgebra::CreateVector(0, 0, 0)); + + CoordinateSystem3D normalized(plane); + normalized.SetOrigin(plane.MapSliceToWorldCoordinates(ox, oy)); + return normalized; + } }