18 #ifndef __itkWatershedSegmenter_h
19 #define __itkWatershedSegmenter_h
87 template<
class TInputImage >
97 itkStaticConstMacro(ImageDimension,
unsigned int,
98 TInputImage::ImageDimension);
186 if ( reg == m_LargestPossibleRegion ) {
return; }
187 m_LargestPossibleRegion = reg;
193 {
return m_LargestPossibleRegion; }
197 static void RelabelImage(OutputImageTypePointer,
203 using Superclass::MakeOutput;
222 itkSetClampMacro(Threshold,
double, 0.0, 1.0);
223 itkGetConstMacro(Threshold,
double);
229 itkSetMacro(DoBoundaryAnalysis,
bool);
230 itkGetConstMacro(DoBoundaryAnalysis,
bool);
237 itkGetConstMacro(SortEdgeLists,
bool);
238 itkSetMacro(SortEdgeLists,
bool);
253 typedef itksys::hash_map< IdentifierType, flat_region_t, itksys::hash< IdentifierType > >
266 typedef itksys::hash_map< IdentifierType, InputPixelType, itksys::hash< IdentifierType >
269 typedef itksys::hash_map< IdentifierType, edge_table_t, itksys::hash< IdentifierType >
275 void PrintSelf(std::ostream & os,
Indent indent)
const;
281 virtual void GenerateConnectivity();
286 void GenerateInputRequestedRegion();
288 void GenerateOutputRequestedRegion(
DataObject *output);
290 void UpdateOutputInformation();
294 void InitializeBoundary();
299 void AnalyzeBoundaryFlow(InputImageTypePointer,
300 flat_region_table_t &,
306 void BuildRetainingWall(InputImageTypePointer,
307 ImageRegionType, InputPixelType);
311 void LabelMinima(InputImageTypePointer,
312 ImageRegionType, flat_region_table_t &,
318 void GradientDescent(InputImageTypePointer, ImageRegionType);
322 void DescendFlatRegions(flat_region_table_t &, ImageRegionType);
326 void UpdateSegmentTable(InputImageTypePointer, ImageRegionType);
331 void CollectBoundaryInformation(flat_region_table_t &);
338 static void Threshold(InputImageTypePointer destination,
339 InputImageTypePointer source,
340 const ImageRegionType source_region,
341 const ImageRegionType destination_region,
342 InputPixelType threshold);
345 static void MinMax(InputImageTypePointer img,
346 ImageRegionType region,
347 InputPixelType & min,
348 InputPixelType & max);
354 static void SetInputImageValues(InputImageTypePointer img,
355 const ImageRegionType region,
356 InputPixelType value);
358 static void SetOutputImageValues(OutputImageTypePointer img,
359 const ImageRegionType region,
387 #ifndef ITK_MANUAL_INSTANTIATION
388 #include "itkWatershedSegmenter.hxx"