18#ifndef itkVoronoiSegmentationImageFilterBase_h
19#define itkVoronoiSegmentationImageFilterBase_h
55template <
typename TInputImage,
typename TOutputImage,
typename TBinaryPriorImage = Image<
unsigned char, 2>>
81 using SizeType =
typename TInputImage::SizeType;
99 using EdgeInfo =
typename VoronoiDiagram::VoronoiEdge;
111 itkSetMacro(NumberOfSeeds,
int);
112 itkGetConstMacro(NumberOfSeeds,
int);
122 itkSetMacro(Steps,
int);
123 itkGetConstMacro(Steps,
int);
127 itkGetConstMacro(LastStepSeeds,
int);
130 itkGetConstMacro(NumberOfSeedsToAdded,
int);
133 itkSetMacro(UseBackgroundInAPrior,
bool);
134 itkGetConstMacro(UseBackgroundInAPrior,
bool);
138 itkSetMacro(OutputBoundary,
bool);
139 itkGetConstMacro(OutputBoundary,
bool);
144 itkSetMacro(InteractiveSegmentation,
bool);
145 itkGetConstMacro(InteractiveSegmentation,
bool);
146 itkBooleanMacro(InteractiveSegmentation);
150 itkSetMacro(MeanDeviation,
double);
151 itkGetConstMacro(MeanDeviation,
double);
187#if !defined(ITK_WRAPPING_PARSER)
209 auto it = seeds.begin();
302#ifndef ITK_MANUAL_INSTANTIATION
303# include "itkVoronoiSegmentationImageFilterBase.hxx"
Base class for all data objects in ITK.
Templated n-dimensional image class.
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
CellInterface< CellPixelType, CellTraits > CellType
typename CellType::CellAutoPointer CellAutoPointer
Implements transparent reference counting.
Implement the Sweep Line Algorithm for the construction of the 2D Voronoi Diagram.
SmartPointer< Self > Pointer
Implements the 2-Dimensional Voronoi Diagram.
typename SeedsType::iterator SeedsIterator
std::vector< PointType > SeedsType
typename std::vector< VoronoiEdge >::iterator VoronoiEdgeIterator
typename MeshTraits::PointType PointType
typename INTvector::iterator NeighborIdIterator
SmartPointer< Self > Pointer
typename VDImage::Pointer VDImagePointer
std::vector< PointType > PointTypeVector
void PrintSelf(std::ostream &os, Indent indent) const override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
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)
TOutputImage OutputImageType
SmartPointer< Self > Pointer
void SetSeeds(int num, SeedsIterator begin)
typename TInputImage::Pointer InputImagePointer
typename VoronoiDiagram::SeedsType SeedsType
std::vector< PointType > m_SeedsToAdded
void GenerateData() override
typename TInputImage::PixelType PixelType
typename TInputImage::ConstPointer InputImageConstPointer
bool m_UseBackgroundInAPrior
VoronoiDiagram2D< double > VoronoiDiagram
virtual void GenerateAddingSeeds()
VoronoiSegmentationImageFilterBase Self
typename TInputImage::SizeType SizeType
typename TInputImage::RegionType RegionType
void SetSeeds(SeedsType &seeds)
SmartPointer< const Self > ConstPointer
void EnlargeOutputRequestedRegion(DataObject *output) override
std::vector< unsigned char > m_Label
typename VoronoiDiagram::CellAutoPointer CellAutoPointer
void GetPixelIndexFromPolygon(PointTypeDeque vertlist, IndexList *PixelPool)
typename VoronoiDiagram::Pointer VoronoiPointer
Image< unsigned char, 2 > VDImage
typename VoronoiDiagram::VoronoiEdge EdgeInfo
typename TInputImage::IndexType IndexType
TBinaryPriorImage BinaryObjectImage
virtual void TakeAPrior(const BinaryObjectImage *)
int m_NumberOfSeedsToAdded
VoronoiPointer GetVoronoiDiagram()
std::vector< SizeValueType > m_NumberOfPixels
VoronoiDiagram2DGenerator< double > VoronoiDiagramGenerator
typename VoronoiDiagram::SeedsIterator SeedsIterator
typename TOutputImage::PixelType OutputPixelType
typename BinaryObjectImage::Pointer BinaryObjectImagePointer
PointType GetSeed(int SeedID)
static constexpr unsigned int ImageDimension
VoronoiDiagram::Pointer m_WorkingVD
SizeValueType m_MinRegion
bool m_InteractiveSegmentation
std::vector< IndexType > IndexList
void GenerateInputRequestedRegion() override
typename VoronoiDiagram::CellType CellType
VoronoiDiagramGenerator::Pointer m_VDGenerator
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)
TInputImage InputImageType
std::deque< PointType > PointTypeDeque
typename CellType::PointIdIterator PointIdIterator
virtual void MakeSegmentObject()
virtual void MakeSegmentBoundary()
virtual void ClassifyDiagram()
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.