| 165 | } |
| 166 | |
| 167 | class AddPolyLineElementToPath |
| 168 | { |
| 169 | public: |
| 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 | |
| 185 | private: |
| 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 | |
| 195 | static itk::PolyLineParametricPath<3>::Pointer CreatePathFromPlanarFigure(BaseGeometry* imageGeometry, PlanarFigure* planarFigure) |
| 196 | { |
no outgoing calls
no test coverage detected