18#ifndef itkQuadEdgeMeshToQuadEdgeMeshFilter_h
19#define itkQuadEdgeMeshToQuadEdgeMeshFilter_h
36template <
typename TInputMesh,
typename TOutputMesh>
53#ifndef ITK_FUTURE_LEGACY_REMOVE
54 using InputCoordRepType ITK_FUTURE_DEPRECATED(
55 "ITK 6 discourages using `InputCoordRepType`. Please use `InputCoordinateType` instead!") =
InputCoordinateType;
84#ifndef ITK_FUTURE_LEGACY_REMOVE
85 using OutputCoordRepType ITK_FUTURE_DEPRECATED(
86 "ITK 6 discourages using `OutputCoordRepType`. Please use `OutputCoordinateType` instead!") =
OutputCoordinateType;
138template <
typename TInputMesh,
typename TOutputMesh>
150template <
typename TInputMesh,
typename TOutputMesh>
154 using InputCellDataContainer =
typename TInputMesh::CellDataContainer;
155 using OutputCellDataContainer =
typename TOutputMesh::CellDataContainer;
159 const InputCellDataContainerConstPointer inputCellData = in->GetCellData();
161 if (inputCellData ==
nullptr)
168 outputCellData->Reserve(inputCellData->Size());
171 using InputCellDataContainerConstIterator =
typename InputCellDataContainer::ConstIterator;
172 InputCellDataContainerConstIterator inIt = inputCellData->Begin();
173 while (inIt != inputCellData->End())
175 const typename OutputCellDataContainer::Element
point(inIt.Value());
176 outputCellData->SetElement(inIt.Index(),
point);
180 out->SetCellData(outputCellData);
184template <
typename TInputMesh,
typename TOutputMesh>
188 using OutputPointDataContainer =
typename TOutputMesh::PointDataContainer;
190 using InputPointDataContainer =
typename TInputMesh::PointDataContainer;
192 const InputPointDataContainer * inputPointData = in->GetPointData();
194 if (inputPointData ==
nullptr)
201 outputPointData->Reserve(inputPointData->Size());
204 using InputPointDataContainerConstIterator =
typename InputPointDataContainer::ConstIterator;
205 InputPointDataContainerConstIterator inIt = inputPointData->Begin();
206 while (inIt != inputPointData->End())
208 const typename OutputPointDataContainer::Element
point(inIt.Value());
209 outputPointData->SetElement(inIt.Index(),
point);
213 out->SetPointData(outputPointData);
217template <
typename TInputMesh,
typename TOutputMesh>
222 using InputCellsContainer =
typename TInputMesh::CellsContainer;
224 using InputCellsContainerConstIterator =
typename InputCellsContainer::ConstIterator;
225 using InputPolygonCellType =
typename TInputMesh::PolygonCellType;
226 using InputPointIdList =
typename TInputMesh::PointIdList;
227 using InputCellTraits =
typename TInputMesh::CellTraits;
228 using InputPointsIdInternalIterator =
typename InputCellTraits::PointIdInternalIterator;
232 const InputCellsContainerConstPointer inCells = in->GetCells();
234 if (inCells ==
nullptr)
240 InputCellsContainerConstIterator cIt = inCells->Begin();
241 const InputCellsContainerConstIterator cEnd = inCells->End();
244 auto * pe =
dynamic_cast<InputPolygonCellType *
>(cIt.Value());
247 InputPointIdList points;
248 InputPointsIdInternalIterator pIt = pe->InternalPointIdsBegin();
249 const InputPointsIdInternalIterator pEnd = pe->InternalPointIdsEnd();
253 points.push_back((*pIt));
256 out->AddFaceWithSecurePointList(points,
false);
263template <
typename TInputMesh,
typename TOutputMesh>
268 using InputCellsContainer =
typename TInputMesh::CellsContainer;
270 using InputCellsContainerConstIterator =
typename InputCellsContainer::ConstIterator;
271 using InputEdgeCellType =
typename TInputMesh::EdgeCellType;
273 const InputCellsContainerConstPointer inEdgeCells = in->GetEdgeCells();
275 if (inEdgeCells ==
nullptr)
281 InputCellsContainerConstIterator ecIt = inEdgeCells->Begin();
282 const InputCellsContainerConstIterator ecEnd = inEdgeCells->End();
284 while (ecIt != ecEnd)
286 auto * pe =
dynamic_cast<InputEdgeCellType *
>(ecIt.Value());
289 out->AddEdgeWithSecurePointList(pe->GetQEGeom()->GetOrigin(), pe->GetQEGeom()->GetDestination());
296template <
typename TInputMesh,
typename TOutputMesh>
301 using InputPointsContainerConstPointer =
typename TInputMesh::PointsContainerConstPointer;
302 using InputPointsContainerConstIterator =
typename TInputMesh::PointsContainerConstIterator;
304 using OutputPointsContainer =
typename TOutputMesh::PointsContainer;
305 using OutputPointsContainerPointer =
typename TOutputMesh::PointsContainerPointer;
308 const InputPointsContainerConstPointer inPoints = in->GetPoints();
310 if (inPoints ==
nullptr)
316 InputPointsContainerConstIterator inIt = inPoints->
Begin();
317 const InputPointsContainerConstIterator inEnd = inPoints->End();
319 OutputPointsContainerPointer oPoints = out->GetPoints();
320 if (oPoints ==
nullptr)
323 out->SetPoints(oPoints);
325 OutputPointType pOut;
327 while (inIt != inEnd)
329 pOut.CastFrom(inIt.Value());
330 oPoints->InsertElement(inIt.Index(), pOut);
336#ifndef ITK_MANUAL_INSTANTIATION
337# 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 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 OutputMeshType::CoordinateType OutputCoordinateType
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 InputMeshType::CoordinateType InputCoordinateType
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)