MCPcopy Create free account
hub / github.com/MITK/MITK / AddPolyLineElementToPath

Class AddPolyLineElementToPath

Modules/ImageStatistics/src/mitkIntensityProfile.cpp:167–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167class AddPolyLineElementToPath
168{
169public:
170 AddPolyLineElementToPath(const PlaneGeometry* planarFigureGeometry, const BaseGeometry* imageGeometry, itk::PolyLineParametricPath<3>::Pointer path)
171 : m_PlanarFigureGeometry(planarFigureGeometry),
172 m_ImageGeometry(imageGeometry),
173 m_Path(path)
174 {
175 }
176
177 void operator()(const PlanarFigure::PolyLineElement& polyLineElement)
178 {
179 m_PlanarFigureGeometry->Map(polyLineElement, m_WorldPoint);
180 m_ImageGeometry->WorldToIndex(m_WorldPoint, m_ContinuousIndexPoint);
181 m_Vertex.CastFrom(m_ContinuousIndexPoint);
182 m_Path->AddVertex(m_Vertex);
183 }
184
185private:
186 const PlaneGeometry* m_PlanarFigureGeometry;
187 const BaseGeometry* m_ImageGeometry;
188 itk::PolyLineParametricPath<3>::Pointer m_Path;
189
190 Point3D m_WorldPoint;
191 Point3D m_ContinuousIndexPoint;
192 itk::PolyLineParametricPath<3>::ContinuousIndexType m_Vertex;
193};
194
195static itk::PolyLineParametricPath<3>::Pointer CreatePathFromPlanarFigure(BaseGeometry* imageGeometry, PlanarFigure* planarFigure)
196{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected