18 #ifndef itkWatershedImageFilter_h
19 #define itkWatershedImageFilter_h
149 template<
typename TInputImage >
152 TInputImage::ImageDimension > >
162 itkStaticConstMacro (ImageDimension,
unsigned int,
163 TInputImage::ImageDimension);
189 void GenerateData() ITK_OVERRIDE;
198 if ( input != this->GetInput(0) )
200 m_InputChanged =
true;
206 m_Segmenter->SetInputImage( const_cast< InputImageType * >( input ) );
209 virtual void SetInput(
unsigned int i,
const TInputImage *image) ITK_OVERRIDE
212 { itkExceptionMacro(<<
"Filter has only one input."); }
214 { this->SetInput(image); }
219 void SetThreshold(
double);
221 itkGetConstMacro(Threshold,
double);
225 void SetLevel(
double);
227 itkGetConstMacro(Level,
double);
234 return m_Segmenter->GetOutputImage();
246 void EnlargeOutputRequestedRegion(
DataObject *data) ITK_OVERRIDE;
248 #ifdef ITK_USE_CONCEPT_CHECKING
264 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
268 virtual void PrepareOutputs() ITK_OVERRIDE;
292 typename watershed::Relabeler<
ScalarType, itkGetStaticConstMacro(ImageDimension) >::
Pointer m_Relabeler;
294 unsigned long m_ObserverTag;
297 bool m_ThresholdChanged;
304 #ifndef ITK_MANUAL_INSTANTIATION
305 #include "itkWatershedImageFilter.hxx"
virtual void Update()
Bring this filter up-to-date.
A low-level image analysis algorithm that automatically produces a hierarchy of segmented, labeled images from a scalar-valued image input.
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
ImageToImageFilter< InputImageType, OutputImageType > Superclass
WatershedImageFilter Self
InputImageType::SizeType SizeType
watershed::SegmentTreeGenerator< ScalarType >::SegmentTreeType * GetSegmentTree()
InputImageType::PixelType ScalarType
InputImageType::RegionType RegionType
Generate a unique, increasing time value.
TInputImage InputImageType
virtual ~WatershedImageFilter() override
virtual void SetInput(unsigned int i, const TInputImage *image) override
SegmentTreeType * GetOutputSegmentTree()
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
InputImageType::IndexType IndexType
ImageBaseType::SizeType SizeType
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
watershed::Segmenter< InputImageType >::OutputImageType * GetBasicSegmentation()
#define itkConceptMacro(name, concept)
Image< IdentifierType, itkGetStaticConstMacro(ImageDimension) > OutputImageType
Base class for all data objects in ITK.
Templated n-dimensional image class.
ImageBaseType::IndexType IndexType