comparison Framework/Toolbox/SliceGeometry.cpp @ 89:f244018a4e4b wasm

BUGGY- trying to remove IVolumeSlicesObserver
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 May 2017 18:27:59 +0200
parents 298f375dcb68
children
comparison
equal deleted inserted replaced
88:90bf4116a23c 89:f244018a4e4b
150 // offset of the origin of the slice wrt. the origin of the 150 // offset of the origin of the slice wrt. the origin of the
151 // reference plane https://en.wikipedia.org/wiki/Vector_projection 151 // reference plane https://en.wikipedia.org/wiki/Vector_projection
152 offsetX = boost::numeric::ublas::inner_prod(axisX_, projection - origin_); 152 offsetX = boost::numeric::ublas::inner_prod(axisX_, projection - origin_);
153 offsetY = boost::numeric::ublas::inner_prod(axisY_, projection - origin_); 153 offsetY = boost::numeric::ublas::inner_prod(axisY_, projection - origin_);
154 } 154 }
155
156
157 bool SliceGeometry::IsSamePlane(const SliceGeometry& other,
158 double sliceThickness) const
159 {
160 return (GeometryToolbox::IsParallel(GetNormal(), other.GetNormal()) &&
161 GeometryToolbox::IsNear(ProjectAlongNormal(other.GetOrigin()),
162 ProjectAlongNormal(GetOrigin()),
163 sliceThickness / 2.0));
164 }
165 } 155 }