Orfeo Toolbox  3.16
itkWatershedEquivalenceRelabeler.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkWatershedEquivalenceRelabeler.h,v $
5  Language: C++
6  Date: $Date: 2009-01-27 19:30:17 $
7  Version: $Revision: 1.10 $
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 __itkWatershedEquivalenceRelabeler_h
18 #define __itkWatershedEquivalenceRelabeler_h
19 
20 #include "itkEquivalencyTable.h"
21 #include "itkWatershedSegmenter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
26 namespace watershed
27 {
51 template <class TScalarType, unsigned int TImageDimension>
53  : public ProcessObject
54 {
55 public:
57  itkStaticConstMacro(ImageDimension, unsigned int,TImageDimension);
58 
63  typedef TScalarType ScalarType;
67 
71  itkNewMacro(Self);
72  itkTypeMacro(WatershedEquivalenceRelabeler, ProcessObject);
73 
75  void SetInputImage(ImageType *img)
76  { this->ProcessObject::SetNthInput(0, img); }
77  const ImageType * GetInputImage(void)
78  {
79  return static_cast<ImageType *>
80  (this->ProcessObject::GetInput(0));
81  }
82 
84  void SetOutputImage(ImageType * img)
85  {
86  this->ProcessObject::SetNthOutput(0,img);
87  }
88  typename ImageType::Pointer GetOutputImage()
89  {
90  return static_cast<ImageType *>
91  (this->ProcessObject::GetOutput(0));
92  }
93 
95  void SetEquivalencyTable(EquivalencyTableType *et)
96  {
97  this->ProcessObject::SetNthInput(1, et);
98  }
99  EquivalencyTableType::Pointer GetEquivalencyTable()
100  {
101  return static_cast<EquivalencyTableType *>
102  (this->ProcessObject::GetInput(1));
103  }
104 
106  void GenerateData();
107 
109  virtual DataObjectPointer MakeOutput(unsigned int idx);
110 
111 protected:
113  {
114  typename ImageType::Pointer img
115  = static_cast<ImageType*>(this->MakeOutput(0).GetPointer());
116  this->SetNumberOfRequiredOutputs(1);
117  this->ProcessObject::SetNthOutput(0, img.GetPointer());
118  }
121  void operator=(const Self&) {}
122  void PrintSelf(std::ostream& os, Indent indent) const;
123 
124  void GenerateOutputRequestedRegion(DataObject *output);
125  void GenerateInputRequestedRegion();
126 };
127 
128 }// end namespace watershed
129 }// end namespace itk
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
133 #endif
134 
135 #endif

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