ITK  5.4.0
Insight Toolkit
Namespaces | Macros
itkQuadEdgeMeshMacro.h File Reference

Go to the source code of this file.

Namespaces

 itk
 

Macros

#define itkQEMeshForAllCellsEndMacro(cellIterator)
 
#define itkQEMeshForAllCellsMacro(MeshType, MeshInstance, cellIterator)
 
#define itkQEMeshForAllPointsEndMacro
 
#define itkQEMeshForAllPrimalEdgesEndMacro
 
#define itkQEMeshForAllPrimalEdgesMacro(MeshType, MeshInstance, EdgeVariable)
 
#define itkQEMeshForAllPointsMacro(MeshType, MeshInstance, PointVariable, PointIndex)
 

Macro Definition Documentation

◆ itkQEMeshForAllCellsEndMacro

#define itkQEMeshForAllCellsEndMacro (   cellIterator)
Value:
++cellIterator; \
} /* while */ \
} /* if */ \
}

Terminates a block of code started with the macro itk::itkQEMeshForAllCellsMacro.

Warning
Should only be used with the corresponding itk::itkQEMeshForAllCellsMacro

Definition at line 123 of file itkQuadEdgeMeshMacro.h.

◆ itkQEMeshForAllCellsMacro

#define itkQEMeshForAllCellsMacro (   MeshType,
  MeshInstance,
  cellIterator 
)
Value:
{ \
using CellsContainer = typename MeshType::CellsContainer; \
using CellsContainerIterator = typename MeshType::CellsContainerIterator; \
/* If no cells are present, do nothing */ \
if (!MeshInstance->GetCells()) \
{ \
itkWarningMacro("No Cells container in itkQEMeshForAllCellsMacro"); \
} \
else \
{ \
CellsContainerIterator cellIterator = MeshInstance->GetCells()->Begin(); \
while (cellIterator != MeshInstance->GetCells()->End()) \
{ \
/* Users code comes here: */

Iterate on all the MeshType::Cells of a given itk::QuadEdgeMesh instance.

Parameters
MeshTypeThe type of the itk::QuadEdgeMesh
MeshInstanceThe instance of the above MeshType we are considering
cellIteratorThe name of the variable the caller wants to use to designate the MeshType::CellContainerIterator at current stage of iteration.
Author
Alexandre Gouaillard, Leonardo Florez-Valencia, Eric Boix

This implementation was contributed as a paper to the Insight Journal https://www.insight-journal.org/browse/publication/122

Warning
Don't forget to close the opened block with the corresponding itk::itkQEMeshForAllCellsEndMacro macro.
See also
itk::itkQEMeshForAllPrimalEdgesMacro

Definition at line 101 of file itkQuadEdgeMeshMacro.h.

◆ itkQEMeshForAllPointsEndMacro

#define itkQEMeshForAllPointsEndMacro
Value:
++pointIterator; \
} /* while */ \
} /* if */ \
}

Terminates a block of code started with the macro itk::itkQEMeshForAllPointsMacro.

Warning
Should only be used with the corresponding itk::itkQEMeshForAllPointsMacro

Definition at line 75 of file itkQuadEdgeMeshMacro.h.

◆ itkQEMeshForAllPointsMacro

#define itkQEMeshForAllPointsMacro (   MeshType,
  MeshInstance,
  PointVariable,
  PointIndex 
)
Value:
{ \
using PointType = typename MeshType::PointType; \
using PointIdentifier = typename MeshType::PointIdentifier; \
using PointsContainer = typename MeshType::PointsContainer; \
using PointsContainerIterator = typename MeshType::PointsContainerIterator; \
\
PointsContainer * points = (MeshInstance)->GetPoints(); \
/* If no points container are present, do nothing */ \
if (!points) \
{ \
itkWarningMacro("No point container in itkQEMeshForAllPointsMacro"); \
} \
else \
{ \
PointsContainerIterator pointIterator = points->Begin(); \
while (pointIterator != points->End()) \
{ \
PointType PointVariable = pointIterator.Value(); \
PointIdentifier PointIndex = pointIterator.Index();

Iterate on all the itk::QuadEdgeMeshPoint of a given itk::QuadEdgeMesh instance.

Parameters
MeshTypeThe type of the itk::QuadEdgeMesh
MeshInstanceThe instance of the above MeshType we are considering
PointVariableThe name of the variable the caller wants to use to designate the MeshType::PointType at current stage of iteration. The variable PointVariable is of type itk::QuadEdgeMesh::PointType.
PointIndexThe name of the variable the caller wants to use to designate the index within the MeshType::PointContainer container and corresponding to PointVariable at current stage of iteration. The variable PointIndex is of type itk::QuadEdgeMesh::PointIdentifier .
Author
Alexandre Gouaillard, Leonardo Florez-Valencia, Eric Boix

This implementation was contributed as a paper to the Insight Journal https://www.insight-journal.org/browse/publication/122

Warning
Don't forget to close the opened block with the corresponding itk::itkQEMeshForAllPointsMacro macro.

Definition at line 47 of file itkQuadEdgeMeshMacro.h.

◆ itkQEMeshForAllPrimalEdgesEndMacro

#define itkQEMeshForAllPrimalEdgesEndMacro
Value:
} /* fi */ \
} \
itkQEMeshForAllCellsEndMacro \
}

Terminates a block of code started with the macro itk::itkQEMeshForAllPrimalEdgesMacro.

Warning
Should only be used with the corresponding itk::itkQEMeshForAllPrimalEdgesMacro

Definition at line 162 of file itkQuadEdgeMeshMacro.h.

◆ itkQEMeshForAllPrimalEdgesMacro

#define itkQEMeshForAllPrimalEdgesMacro (   MeshType,
  MeshInstance,
  EdgeVariable 
)
Value:
{ \
using QEPrimal = typename MeshType::QEPrimal; \
itkQEMeshForAllCellsMacro(MeshType, MeshInstance, cellIterator) \
{ \
if (QEPrimal * EdgeVariable = dynamic_cast<QEPrimal *>(cellIterator.Value())) \
{ \
/* Users code comes here: */

Iterate on all the MeshType::QEPrimal* of a given itk::QuadEdgeMesh instance.

Parameters
MeshTypeThe type of the itk::QuadEdgeMesh
MeshInstanceThe instance of the above MeshType we are considering
EdgeVariableThe name of the variable the caller wants to use to designate the MeshType::QEPrimal* at current stage of iteration.
Author
Alexandre Gouaillard, Leonardo Florez-Valencia, Eric Boix

This implementation was contributed as a paper to the Insight Journal https://www.insight-journal.org/browse/publication/122

Warning
Don't forget to close the opened block with the corresponding itk::itkQEMeshForAllPrimalEdgesMacro macro.

Definition at line 146 of file itkQuadEdgeMeshMacro.h.

itkQEMeshForAllCellsMacro
#define itkQEMeshForAllCellsMacro(MeshType, MeshInstance, cellIterator)
Iterate on all the MeshType::Cells of a given itk::QuadEdgeMesh instance.
Definition: itkQuadEdgeMeshMacro.h:101
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51