18#ifndef itkQuadEdgeMeshToQuadEdgeMeshFilter_h
19#define itkQuadEdgeMeshToQuadEdgeMeshFilter_h
36template <
typename TInputMesh,
typename TOutputMesh>
130template <
typename TInputMesh,
typename TOutputMesh>
142template <
typename TInputMesh,
typename TOutputMesh>
146 using InputCellDataContainer =
typename TInputMesh::CellDataContainer;
147 using OutputCellDataContainer =
typename TOutputMesh::CellDataContainer;
151 InputCellDataContainerConstPointer inputCellData = in->GetCellData();
153 if (inputCellData ==
nullptr)
160 outputCellData->Reserve(inputCellData->Size());
163 using InputCellDataContainerConstIterator =
typename InputCellDataContainer::ConstIterator;
164 InputCellDataContainerConstIterator inIt = inputCellData->Begin();
165 while (inIt != inputCellData->End())
167 typename OutputCellDataContainer::Element
point(inIt.Value());
168 outputCellData->SetElement(inIt.Index(),
point);
172 out->SetCellData(outputCellData);
176template <
typename TInputMesh,
typename TOutputMesh>
180 using OutputPointDataContainer =
typename TOutputMesh::PointDataContainer;
182 using InputPointDataContainer =
typename TInputMesh::PointDataContainer;
184 const InputPointDataContainer * inputPointData = in->GetPointData();
186 if (inputPointData ==
nullptr)
193 outputPointData->Reserve(inputPointData->Size());
196 using InputPointDataContainerConstIterator =
typename InputPointDataContainer::ConstIterator;
197 InputPointDataContainerConstIterator inIt = inputPointData->Begin();
198 while (inIt != inputPointData->End())
200 typename OutputPointDataContainer::Element
point(inIt.Value());
201 outputPointData->SetElement(inIt.Index(),
point);
205 out->SetPointData(outputPointData);
209template <
typename TInputMesh,
typename TOutputMesh>
214 using InputCellsContainer =
typename TInputMesh::CellsContainer;
216 using InputCellsContainerConstIterator =
typename InputCellsContainer::ConstIterator;
217 using InputPolygonCellType =
typename TInputMesh::PolygonCellType;
218 using InputPointIdList =
typename TInputMesh::PointIdList;
219 using InputCellTraits =
typename TInputMesh::CellTraits;
220 using InputPointsIdInternalIterator =
typename InputCellTraits::PointIdInternalIterator;
224 InputCellsContainerConstPointer inCells = in->GetCells();
226 if (inCells ==
nullptr)
232 InputCellsContainerConstIterator cIt = inCells->Begin();
233 InputCellsContainerConstIterator cEnd = inCells->End();
236 auto * pe =
dynamic_cast<InputPolygonCellType *
>(cIt.Value());
239 InputPointIdList points;
240 InputPointsIdInternalIterator pIt = pe->InternalPointIdsBegin();
241 InputPointsIdInternalIterator pEnd = pe->InternalPointIdsEnd();
245 points.push_back((*pIt));
248 out->AddFaceWithSecurePointList(points,
false);
255template <
typename TInputMesh,
typename TOutputMesh>
260 using InputCellsContainer =
typename TInputMesh::CellsContainer;
262 using InputCellsContainerConstIterator =
typename InputCellsContainer::ConstIterator;
263 using InputEdgeCellType =
typename TInputMesh::EdgeCellType;
265 InputCellsContainerConstPointer inEdgeCells = in->GetEdgeCells();
267 if (inEdgeCells ==
nullptr)
273 InputCellsContainerConstIterator ecIt = inEdgeCells->Begin();
274 InputCellsContainerConstIterator ecEnd = inEdgeCells->End();
276 while (ecIt != ecEnd)
278 auto * pe =
dynamic_cast<InputEdgeCellType *
>(ecIt.Value());
281 out->AddEdgeWithSecurePointList(pe->GetQEGeom()->GetOrigin(), pe->GetQEGeom()->GetDestination());
288template <
typename TInputMesh,
typename TOutputMesh>
293 using InputPointsContainerConstPointer =
typename TInputMesh::PointsContainerConstPointer;
294 using InputPointsContainerConstIterator =
typename TInputMesh::PointsContainerConstIterator;
296 using OutputPointsContainer =
typename TOutputMesh::PointsContainer;
297 using OutputPointsContainerPointer =
typename TOutputMesh::PointsContainerPointer;
300 InputPointsContainerConstPointer inPoints = in->GetPoints();
302 if (inPoints ==
nullptr)
308 InputPointsContainerConstIterator inIt = inPoints->
Begin();
309 InputPointsContainerConstIterator inEnd = inPoints->End();
311 OutputPointsContainerPointer oPoints = out->GetPoints();
312 if (oPoints ==
nullptr)
315 out->SetPoints(oPoints);
317 OutputPointType pOut;
319 while (inIt != inEnd)
321 pOut.CastFrom(inIt.Value());
322 oPoints->InsertElement(inIt.Index(), pOut);
328#ifndef ITK_MANUAL_INSTANTIATION
329# include "itkQuadEdgeMeshToQuadEdgeMeshFilter.hxx"
Light weight base class for most itk classes.
typename OutputMeshType::Pointer OutputMeshPointer
TOutputMesh OutputMeshType
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
typename InputMeshType::Pointer InputMeshPointer
Duplicates the content of a Mesh.
typename InputMeshType::CellsContainerConstPointer InputCellsContainerConstPointer
virtual void CopyInputMeshToOutputMeshEdgeCells()
virtual void CopyInputMeshToOutputMeshGeometry()
typename OutputQEPrimal::IteratorGeom OutputQEIterator
typename OutputMeshType::PointsContainerConstPointer OutputPointsContainerConstPointer
typename OutputMeshType::CellDataContainer OutputCellDataContainer
typename InputMeshType::PointsContainerConstPointer InputPointsContainerConstPointer
typename OutputMeshType::QEPrimal OutputQEPrimal
typename InputMeshType::ConstPointer InputMeshConstPointer
typename InputMeshType::CoordRepType InputCoordRepType
typename OutputMeshType::PointType OutputPointType
typename InputMeshType::PointDataContainer InputPointDataContainer
typename InputMeshType::VectorType InputVectorType
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
typename InputQEPrimal::IteratorGeom InputQEIterator
typename InputMeshType::PolygonCellType InputPolygonCellType
typename OutputMeshType::ConstPointer OutputMeshConstPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::PointDataContainer OutputPointDataContainer
virtual void CopyInputMeshToOutputMeshFieldData()
typename InputMeshType::QEPrimal InputQEPrimal
typename InputMeshType::PointIdentifier InputPointIdentifier
QuadEdgeMeshToQuadEdgeMeshFilter()
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
typename InputMeshType::PointType InputPointType
typename InputMeshType::PointIdList InputPointIdList
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
typename InputCellTraits::PointIdInternalIterator InputPointsIdInternalIterator
typename OutputMeshType::VectorType OutputVectorType
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
virtual void CopyInputMeshToOutputMeshCells()
virtual void CopyInputMeshToOutputMeshPoints()
typename InputPointDataContainer::ConstPointer InputPointDataContainerConstPointer
typename InputMeshType::EdgeCellType InputEdgeCellType
virtual void CopyInputMeshToOutputMeshCellData()
~QuadEdgeMeshToQuadEdgeMeshFilter() override=default
virtual void CopyInputMeshToOutputMeshPointData()
typename OutputMeshType::CoordRepType OutputCoordRepType
typename InputMeshType::CellTraits InputCellTraits
virtual void CopyInputMeshToOutputMesh()
typename InputMeshType::CellDataContainer InputCellDataContainer
@ CellsAllocatedDynamicallyCellByCell
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void CopyMeshToMeshPointData(const TInputMesh *in, TOutputMesh *out)
void CopyMeshToMeshPoints(const TInputMesh *in, TOutputMesh *out)
void CopyMeshToMesh(const TInputMesh *in, TOutputMesh *out)
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
void CopyMeshToMeshCells(const TInputMesh *in, TOutputMesh *out)
void CopyMeshToMeshCellData(const TInputMesh *in, TOutputMesh *out)
void CopyMeshToMeshEdgeCells(const TInputMesh *in, TOutputMesh *out)