18#ifndef itkVoronoiSegmentationImageFilterBase_h
19#define itkVoronoiSegmentationImageFilterBase_h
58template <
typename TInputImage,
typename TOutputImage,
typename TBinaryPriorImage = Image<
unsigned char, 2>>
77 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
114 itkSetMacro(NumberOfSeeds,
int);
115 itkGetConstMacro(NumberOfSeeds,
int);
125 itkSetMacro(Steps,
int);
126 itkGetConstMacro(Steps,
int);
130 itkGetConstMacro(LastStepSeeds,
int);
133 itkGetConstMacro(NumberOfSeedsToAdded,
int);
136 itkSetMacro(UseBackgroundInAPrior,
bool);
137 itkGetConstMacro(UseBackgroundInAPrior,
bool);
141 itkSetMacro(OutputBoundary,
bool);
142 itkGetConstMacro(OutputBoundary,
bool);
147 itkSetMacro(InteractiveSegmentation,
bool);
148 itkGetConstMacro(InteractiveSegmentation,
bool);
149 itkBooleanMacro(InteractiveSegmentation);
153 itkSetMacro(MeanDeviation,
double);
154 itkGetConstMacro(MeanDeviation,
double);
190#if !defined(ITK_WRAPPING_PARSER)
198 m_NumberOfSeeds = num;
199 m_WorkingVD->SetSeeds(num, begin);
211 m_NumberOfSeeds = seeds.size();
212 auto it = seeds.begin();
213 m_WorkingVD->SetSeeds(m_NumberOfSeeds, it);
221 return m_WorkingVD->GetSeed(SeedID);
251 int m_NumberOfSeeds{ 200 };
254 int m_LastStepSeeds{ 0 };
255 int m_NumberOfSeedsToAdded{ 0 };
256 int m_NumberOfBoundary{ 0 };
258 std::vector<SizeValueType> m_NumberOfPixels{};
259 std::vector<unsigned char> m_Label{};
261 double m_MeanDeviation{ 0.8 };
262 bool m_UseBackgroundInAPrior{
false };
263 bool m_OutputBoundary{
false };
265 bool m_InteractiveSegmentation{
false };
271 std::vector<PointType> m_SeedsToAdded{};
305#ifndef ITK_MANUAL_INSTANTIATION
306# include "itkVoronoiSegmentationImageFilterBase.hxx"
An abstract interface for cells.
Base class for all data objects in ITK.
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
TInputImage InputImageType
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::Pointer InputImagePointer
Templated n-dimensional image class.
Control indentation during Print() invocation.
typename CellType::CellAutoPointer CellAutoPointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Implement the Sweep Line Algorithm for the construction of the 2D Voronoi Diagram.
Implements the 2-Dimensional Voronoi Diagram.
typename std::vector< VoronoiEdge >::iterator VoronoiEdgeIterator
typename SeedsType::iterator SeedsIterator
typename INTvector::iterator NeighborIdIterator
std::vector< PointType > SeedsType
Base class for VoronoiSegmentationImageFilter.
typename VDImage::Pointer VDImagePointer
std::vector< PointType > PointTypeVector
void PrintSelf(std::ostream &os, Indent indent) const override
typename VoronoiDiagram::VoronoiEdgeIterator EdgeIterator
void drawVDline(VDImagePointer result, PointType p1, PointType p2, unsigned char color)
typename VoronoiDiagram::PointType PointType
void DrawDiagram(VDImagePointer result, unsigned char incolor, unsigned char outcolor, unsigned char boundcolor)
void SetSeeds(int num, SeedsIterator begin)
typename VoronoiDiagram::SeedsType SeedsType
void GenerateData() override
typename TInputImage::PixelType PixelType
virtual void GenerateAddingSeeds()
typename TInputImage::SizeType SizeType
typename TInputImage::RegionType RegionType
void SetSeeds(SeedsType &seeds)
void EnlargeOutputRequestedRegion(DataObject *output) override
typename VoronoiDiagram::CellAutoPointer CellAutoPointer
void GetPixelIndexFromPolygon(PointTypeDeque vertlist, IndexList *PixelPool)
typename VoronoiDiagram::Pointer VoronoiPointer
typename VoronoiDiagram::VoronoiEdge EdgeInfo
typename TInputImage::IndexType IndexType
TBinaryPriorImage BinaryObjectImage
virtual void TakeAPrior(const BinaryObjectImage *)
VoronoiPointer GetVoronoiDiagram()
typename VoronoiDiagram::SeedsIterator SeedsIterator
typename TOutputImage::PixelType OutputPixelType
typename BinaryObjectImage::Pointer BinaryObjectImagePointer
PointType GetSeed(int SeedID)
std::vector< IndexType > IndexList
void GenerateInputRequestedRegion() override
typename VoronoiDiagram::CellType CellType
virtual bool TestHomogeneity(IndexList &)
~VoronoiSegmentationImageFilterBase() override=default
VoronoiSegmentationImageFilterBase()
void drawLine(PointType p1, PointType p2)
typename VoronoiDiagram::NeighborIdIterator NeighborIdIterator
void FillPolygon(PointTypeDeque vertlist, OutputPixelType color=1)
std::deque< PointType > PointTypeDeque
typename CellType::PointIdIterator PointIdIterator
virtual void MakeSegmentObject()
virtual void MakeSegmentBoundary()
virtual void ClassifyDiagram()
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Represent a n-dimensional size (bounds) of a n-dimensional image.