Orfeo Toolbox  3.16
itkWatershedRelabeler.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkWatershedRelabeler.h,v $
5  Language: C++
6  Date: $Date: 2009-04-23 03:53:38 $
7  Version: $Revision: 1.12 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkWatershedRelabeler_h
18 #define __itkWatershedRelabeler_h
19 
20 #include "itkEquivalencyTable.h"
22 #include "itkWatershedSegmenter.h"
23 #include "itkImage.h"
24 
25 namespace itk
26 {
27 namespace watershed
28 {
29 
63 template <class TScalarType, unsigned int TImageDimension>
65  : public ProcessObject
66 {
67 public:
69  typedef Relabeler Self;
73  itkNewMacro(Self);
74  itkTypeMacro(WatershedRelabeler, ProcessObject);
75 
77  itkStaticConstMacro(ImageDimension, unsigned int,TImageDimension);
78 
80  typedef TScalarType ScalarType;
85 
87  virtual DataObjectPointer MakeOutput(unsigned int idx);
88 
90  void SetInputImage(ImageType *img)
91  {
92  this->ProcessObject::SetNthInput(0, img);
93  }
94  ImageType * GetInputImage(void)
95  {
96  return static_cast<ImageType *>
97  (this->ProcessObject::GetInput(0) );
98  }
99 
101  void SetOutputImage(ImageType * img)
102  {
103  this->ProcessObject::SetNthOutput(0,img);
104  }
105  ImageType * GetOutputImage(void)
106  {
107  return static_cast<ImageType *>
108  (this->ProcessObject::GetOutput(0) );
109  }
110 
112  void SetInputSegmentTree(SegmentTreeType *et)
113  {
114  this->ProcessObject::SetNthInput(1, et);
115  }
116  SegmentTreeType * GetInputSegmentTree(void)
117  {
118  return static_cast<SegmentTreeType *>
119  (this->ProcessObject::GetInput(1));
120  }
121 
123  void GenerateData();
124 
127  itkSetClampMacro(FloodLevel, double, 0.0, 1.0);
128  itkGetConstMacro(FloodLevel, double);
129 
131  void GraftOutput(ImageType *graft);
132  void GraftNthOutput(unsigned int idx, ImageType *graft);
133 
134 protected:
135  Relabeler();
136  virtual ~Relabeler() {}
137  Relabeler(const Self&) {}
138  void operator=(const Self&) {}
139  void PrintSelf(std::ostream& os, Indent indent) const;
140 
141  double m_FloodLevel;
142  void GenerateOutputRequestedRegion(DataObject *output);
143  void GenerateInputRequestedRegion();
144 };
145 
146 }// end namespace watershed
147 }// end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkWatershedRelabeler.txx"
151 #endif
152 
153 #endif

Generated at Sun May 19 2013 00:15:05 for Orfeo Toolbox with doxygen 1.8.3.1