18 #ifndef itkVoronoiSegmentationImageFilterBase_h
19 #define itkVoronoiSegmentationImageFilterBase_h
58 template<
typename TInputImage,
typename TOutputImage,
typename TBinaryPriorImage = Image<
unsigned char, 2 > >
76 itkStaticConstMacro(ImageDimension,
unsigned int,
77 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);
170 void RunSegmentOneStep();
173 virtual void MakeSegmentBoundary();
175 virtual void MakeSegmentObject();
179 {
return m_WorkingVD; }
181 #if !defined( ITK_WRAPPING_PARSER ) // generates invalid iterator instantiation
188 m_NumberOfSeeds = num;
189 m_WorkingVD->SetSeeds(num, begin);
200 m_NumberOfSeeds = seeds.size();
201 typename SeedsType::iterator it = seeds.begin();
202 m_WorkingVD->SetSeeds(m_NumberOfSeeds, it);
208 {
return m_WorkingVD->GetSeed(SeedID); }
211 void DrawDiagram(VDImagePointer result,
unsigned char incolor,
212 unsigned char outcolor,
unsigned char boundcolor);
214 void BeforeNextStep();
218 virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
222 virtual
void EnlargeOutputRequestedRegion(
DataObject *output) ITK_OVERRIDE;
226 ~VoronoiSegmentationImageFilterBase() ITK_OVERRIDE;
227 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
229 void GenerateData() ITK_OVERRIDE;
236 int m_NumberOfSeedsToAdded;
237 int m_NumberOfBoundary;
240 std::vector<
unsigned char > m_Label;
242 double m_MeanDeviation;
243 bool m_UseBackgroundInAPrior;
244 bool m_OutputBoundary;
246 bool m_InteractiveSegmentation;
256 virtual
void ClassifyDiagram();
259 virtual
void GenerateAddingSeeds();
267 void FillPolygon(PointTypeDeque vertlist, OutputPixelType color = 1);
273 void drawVDline(VDImagePointer result,
PointType p1,
PointType p2,
unsigned char color);
280 #ifndef ITK_MANUAL_INSTANTIATION
281 #include "itkVoronoiSegmentationImageFilterBase.hxx"
Superclass::CellType CellType
TInputImage::Pointer InputImagePointer
Base class for VoronoiSegmentationImageFilter.
VoronoiDiagram::SeedsType SeedsType
VoronoiDiagram::Pointer VoronoiPointer
std::vector< VoronoiEdge >::iterator VoronoiEdgeIterator
BinaryObjectImage::Pointer BinaryObjectImagePointer
std::vector< IndexType > IndexList
Represent the size (bounds) of a n-dimensional image.
void SetSeeds(int num, SeedsIterator begin)
Image< unsigned char, 2 > VDImage
VoronoiDiagram::VoronoiEdge EdgeInfo
SeedsType::iterator SeedsIterator
VoronoiDiagram::VoronoiEdgeIterator EdgeIterator
VoronoiDiagram2DGenerator< double > VoronoiDiagramGenerator
TInputImage::PixelType PixelType
CellType::PointIdIterator PointIdIterator
Implements the 2-Dimensional Voronoi Diagram.
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
VoronoiDiagram::SeedsIterator SeedsIterator
unsigned long SizeValueType
PointType GetSeed(int SeedID)
VoronoiDiagram::CellAutoPointer CellAutoPointer
VoronoiDiagram::PointType PointType
TOutputImage::PixelType OutputPixelType
SmartPointer< const Self > ConstPointer
VoronoiPointer GetVoronoiDiagram(void)
void SetSeeds(SeedsType &seeds)
VoronoiDiagram::CellType CellType
VoronoiDiagram2D< double > VoronoiDiagram
TInputImage::ConstPointer InputImageConstPointer
ImageBaseType::PointType PointType
std::vector< PointType > PointTypeVector
SmartPointer< Self > Pointer
virtual void TakeAPrior(const BinaryObjectImage *)
TOutputImage OutputImageType
INTvector::iterator NeighborIdIterator
VoronoiSegmentationImageFilterBase Self
VDImage::Pointer VDImagePointer
TInputImage InputImageType
Base class for filters that take an image as input and produce an image as output.
Implement the Sweep Line Algorithm for the construction of the 2D Voronoi Diagram.
TInputImage::IndexType IndexType
Control indentation during Print() invocation.
TBinaryPriorImage BinaryObjectImage
ImageBaseType::SizeType SizeType
std::vector< PointType > SeedsType
Superclass::CellAutoPointer CellAutoPointer
std::deque< PointType > PointTypeDeque
A templated class holding a geometric point in n-Dimensional space.
TInputImage::RegionType RegionType
Base class for all data objects in ITK.
Templated n-dimensional image class.
VoronoiDiagram::NeighborIdIterator NeighborIdIterator
TInputImage::SizeType SizeType
ImageBaseType::IndexType IndexType