Orfeo Toolbox  4.0
itkWatershedEquivalenceRelabeler.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkWatershedEquivalenceRelabeler_h
19 #define __itkWatershedEquivalenceRelabeler_h
20 
21 #include "itkWatershedSegmenter.h"
22 
23 namespace itk
24 {
25 namespace watershed
26 {
52 template< typename TScalar, unsigned int TImageDimension >
54  public ProcessObject
55 {
56 public:
58  itkStaticConstMacro(ImageDimension, unsigned int, TImageDimension);
59 
64  typedef TScalar ScalarType;
68 
72  itkNewMacro(Self);
73  itkTypeMacro(WatershedEquivalenceRelabeler, ProcessObject);
74 
77  { this->ProcessObject::SetNthInput(0, img); }
78  const ImageType * GetInputImage(void)
79  {
80  return static_cast< ImageType * >
81  ( this->ProcessObject::GetInput(0) );
82  }
83 
86  {
87  this->ProcessObject::SetNthOutput(0, img);
88  }
89 
91  {
92  return static_cast< ImageType * >
93  ( this->ProcessObject::GetOutput(0) );
94  }
95 
98  {
99  this->ProcessObject::SetNthInput(1, et);
100  }
101 
103  {
104  return static_cast< EquivalencyTableType * >
105  ( this->ProcessObject::GetInput(1) );
106  }
107 
109  void GenerateData();
110 
115 
116 protected:
118  {
119  typename ImageType::Pointer img =
120  static_cast< ImageType * >( this->MakeOutput(0).GetPointer() );
122  this->ProcessObject::SetNthOutput( 0, img.GetPointer() );
123  }
124 
127  void operator=(const Self &) {}
128  void PrintSelf(std::ostream & os, Indent indent) const;
129 
131 
133 };
134 } // end namespace watershed
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
139 #endif
140 
141 #endif

Generated at Sat Mar 8 2014 15:46:40 for Orfeo Toolbox with doxygen 1.8.3.1