28 #ifndef itkConnectedRegionsMeshFilter_h
29 #define itkConnectedRegionsMeshFilter_h
49 template<
typename TInputMesh,
typename TOutputMesh >
85 static constexpr
unsigned int PointDimension = TInputMesh::PointDimension;
109 enum { PointSeededRegions = 0,
110 CellSeededRegions = 1,
111 SpecifiedRegions = 2,
114 ClosestPointRegion = 5 };
122 itkSetMacro(ExtractionMode,
int);
123 itkGetConstMacro(ExtractionMode,
int);
128 this->SetExtractionMode(Self::PointSeededRegions);
133 this->SetExtractionMode(Self::CellSeededRegions);
138 this->SetExtractionMode(Self::SpecifiedRegions);
143 this->SetExtractionMode(Self::LargestRegion);
148 this->SetExtractionMode(Self::AllRegions);
153 this->SetExtractionMode(Self::ClosestPointRegion);
172 m_SeedList.push_back(
id);
187 m_RegionList.clear();
197 m_RegionList.push_back(
id);
212 if ( m_ClosestPoint != p )
222 return m_ClosestPoint;
230 return m_RegionList.size();
238 void PrintSelf(std::ostream & os,
Indent indent)
const override;
240 void GenerateData()
override;
242 void PropagateConnectedWave();
255 std::vector< IdentifierType > *m_Wave{
nullptr};
256 std::vector< IdentifierType > *m_Wave2{
nullptr};
260 #ifndef ITK_MANUAL_INSTANTIATION
261 #include "itkConnectedRegionsMeshFilter.hxx"
std::vector< IdentifierType > m_RegionList
typename TInputMesh::PointCellLinksContainer InputMeshCellLinksContainer
typename TInputMesh::CellsContainerPointer InputMeshCellsContainerPointer
Light weight base class for most itk classes.
typename InputMeshType::CellDataContainer::ConstIterator CellDataContainerConstIterator
unsigned long SizeValueType
void SetExtractionModeToClosestPointRegion()
typename TInputMesh::CellIdentifier InputMeshCellIdentifier
typename TInputMesh::CellDataContainerPointer InputMeshCellDataContainerPointer
typename TInputMesh::CellDataContainer InputMeshCellDataContainer
InputMeshPointType & GetClosestPoint(InputMeshPointType &)
std::vector< SizeValueType > m_RegionSizes
typename TInputMesh::CellTraits::PointIdConstIterator InputMeshPointIdConstIterator
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
void SetExtractionModeToLargestRegion()
void AddSeed(IdentifierType id)
IdentifierType m_RegionNumber
typename TInputMesh::CellsContainerConstPointer InputMeshCellsContainerConstPointer
typename TInputMesh::CellAutoPointer InputMeshCellPointer
typename TInputMesh::CellDataContainerConstPointer InputMeshCellDataContainerConstPointer
SizeValueType IdentifierType
SizeValueType m_NumberOfCellsInRegion
void SetClosestPoint(InputMeshPointType &p)
typename InputMeshType::PointsContainer::ConstIterator PointsContainerConstIterator
typename TInputMesh::PointsContainerConstPointer InputMeshPointsContainerConstPointer
void SetExtractionModeToCellSeededRegions()
typename TInputMesh::CellLinksContainerConstPointer InputMeshCellLinksContainerConstPointer
void SetExtractionModeToPointSeededRegions()
typename TInputMesh::PointIdentifier InputMeshPointIdentifier
std::vector< OffsetValueType > m_Visited
void AddSpecifiedRegion(IdentifierType id)
void InitializeSpecifiedRegionList()
std::vector< IdentifierType > m_SeedList
typename TInputMesh::PointType InputMeshPointType
TOutputMesh OutputMeshType
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
typename TOutputMesh::Pointer OutputMeshPointer
typename TInputMesh::CellsContainer InputMeshCellsContainer
SizeValueType GetNumberOfExtractedRegions()
typename TInputMesh::ConstPointer InputMeshConstPointer
void SetExtractionModeToAllRegions()
void SetExtractionModeToSpecifiedRegions()
Extract portions of a mesh that are connected at vertices.
InputMeshPointType m_ClosestPoint
typename InputMeshType::CellsContainer::ConstIterator CellsContainerConstIterator
void InitializeSeedList()