comparison Framework/Toolbox/Slice.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 ffa6dded91bd
children af312ce4fe59
comparison
equal deleted inserted replaced
88:90bf4116a23c 89:f244018a4e4b
168 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 168 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
169 } 169 }
170 170
171 return converter_; 171 return converter_;
172 } 172 }
173
174
175 bool Slice::ContainsPlane(const SliceGeometry& plane) const
176 {
177 if (type_ == Type_Invalid)
178 {
179 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
180 }
181
182 return (GeometryToolbox::IsParallel(GetGeometry().GetNormal(), plane.GetNormal()) &&
183 GeometryToolbox::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()),
184 GetGeometry().ProjectAlongNormal(plane.GetOrigin()),
185 thickness_ / 2.0));
186 }
173 } 187 }