28#ifndef itkConnectedRegionsMeshFilter_h
29#define itkConnectedRegionsMeshFilter_h
49template <
typename TInputMesh,
typename TOutputMesh>
88 static constexpr unsigned int PointDimension = TInputMesh::PointDimension;
114 PointSeededRegions = 0,
115 CellSeededRegions = 1,
116 SpecifiedRegions = 2,
119 ClosestPointRegion = 5
128 itkSetMacro(ExtractionMode,
int);
129 itkGetConstMacro(ExtractionMode,
int);
135 this->SetExtractionMode(Self::PointSeededRegions);
141 this->SetExtractionMode(Self::CellSeededRegions);
147 this->SetExtractionMode(Self::SpecifiedRegions);
153 this->SetExtractionMode(Self::LargestRegion);
159 this->SetExtractionMode(Self::AllRegions);
165 this->SetExtractionMode(Self::ClosestPointRegion);
186 m_SeedList.push_back(
id);
203 m_RegionList.clear();
214 m_RegionList.push_back(
id);
231 if (m_ClosestPoint != p)
242 return m_ClosestPoint;
251 return m_RegionNumber;
268 int m_ExtractionMode{};
270 std::vector<IdentifierType> m_SeedList{};
271 std::vector<IdentifierType> m_RegionList{};
272 std::vector<SizeValueType> m_RegionSizes{};
274 std::vector<OffsetValueType> m_Visited{};
277 std::vector<IdentifierType> * m_Wave{
nullptr };
278 std::vector<IdentifierType> * m_Wave2{
nullptr };
282#ifndef ITK_MANUAL_INSTANTIATION
283# include "itkConnectedRegionsMeshFilter.hxx"
Extract portions of a mesh that are connected at vertices.
typename TInputMesh::CellAutoPointer InputMeshCellPointer
typename TInputMesh::CellDataContainerPointer InputMeshCellDataContainerPointer
typename TInputMesh::PointIdentifier InputMeshPointIdentifier
void AddSpecifiedRegion(IdentifierType id)
typename TInputMesh::PointCellLinksContainer InputMeshCellLinksContainer
void SetExtractionModeToClosestPointRegion()
void AddSeed(IdentifierType id)
typename InputMeshType::CellsContainer::ConstIterator CellsContainerConstIterator
void SetExtractionModeToCellSeededRegions()
typename TInputMesh::PointsContainerConstPointer InputMeshPointsContainerConstPointer
typename TInputMesh::CellDataContainer InputMeshCellDataContainer
typename TInputMesh::CellLinksContainerConstPointer InputMeshCellLinksContainerConstPointer
void InitializeSpecifiedRegionList()
typename InputMeshType::CellDataContainer::ConstIterator CellDataContainerConstIterator
~ConnectedRegionsMeshFilter() override=default
void SetClosestPoint(InputMeshPointType &p)
typename InputMeshType::PointsContainer::ConstIterator PointsContainerConstIterator
typename TOutputMesh::Pointer OutputMeshPointer
typename TInputMesh::PointType InputMeshPointType
typename TInputMesh::CellTraits::PointIdConstIterator InputMeshPointIdConstIterator
void SetExtractionModeToLargestRegion()
void GenerateData() override
void DeleteSpecifiedRegion(IdentifierType id)
InputMeshPointType & GetClosestPoint(InputMeshPointType &)
typename TInputMesh::CellsContainerPointer InputMeshCellsContainerPointer
SizeValueType GetNumberOfExtractedRegions()
void PrintSelf(std::ostream &os, Indent indent) const override
TOutputMesh OutputMeshType
typename TInputMesh::ConstPointer InputMeshConstPointer
typename TInputMesh::CellIdentifier InputMeshCellIdentifier
void SetExtractionModeToSpecifiedRegions()
void InitializeSeedList()
void SetExtractionModeToAllRegions()
typename TInputMesh::CellsContainerConstPointer InputMeshCellsContainerConstPointer
void PropagateConnectedWave()
typename TInputMesh::CellDataContainerConstPointer InputMeshCellDataContainerConstPointer
void SetExtractionModeToPointSeededRegions()
void DeleteSeed(IdentifierType id)
typename TInputMesh::CellsContainer InputMeshCellsContainer
ConnectedRegionsMeshFilter()
Control indentation during Print() invocation.
Light weight base class for most itk classes.
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
unsigned long SizeValueType