Orfeo Toolbox  3.16
itkWatershedBoundaryResolver.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkWatershedBoundaryResolver.h,v $
5  Language: C++
6  Date: $Date: 2009-04-23 03:53:37 $
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 __itkWatershedBoundaryResolver_h
18 #define __itkWatershedBoundaryResolver_h
19 
20 #if defined(_MSC_VER)
21 #pragma warning ( disable : 4786 )
22 #endif
23 #include "itkWatershedBoundary.h"
24 #include "itkEquivalencyTable.h"
25 #include "itkWatershedSegmenter.h"
26 
27 namespace itk
28 {
29 namespace watershed
30 {
65 template <class TPixelType, unsigned int TDimension>
67 {
68 public:
74  itkNewMacro(Self);
75  itkTypeMacro(WatershedBoundaryResolver, ProcessObject);
76 
78  itkStaticConstMacro(ImageDimension, unsigned int, TDimension);
79 
81  typedef TPixelType PixelType;
86 
88  void SetBoundaryA(BoundaryType *bd)
89  { this->ProcessObject::SetNthInput(0, bd); }
90  typename BoundaryType::Pointer GetBoundaryA()
91  { return static_cast<BoundaryType *>(this->GetInput(0)); }
92 
94  void SetBoundaryB(BoundaryType *bd)
95  { this->ProcessObject::SetNthInput(1, bd); }
96  typename BoundaryType::Pointer GetBoundaryB()
97  { return static_cast<BoundaryType *>(this->GetInput(1)); }
98 
101  itkSetMacro(Face, unsigned short);
102  itkGetConstMacro(Face, unsigned short);
103 
107  void SetEquivalencyTable(EquivalencyTableType::Pointer a)
108  { this->ProcessObject::SetNthOutput(0, a.GetPointer()); }
109  EquivalencyTableType::Pointer GetEquivalencyTable()
110  { return static_cast<EquivalencyTableType *>
111  (this->ProcessObject::GetOutput(0)); }
112 
114  void GenerateData();
115 
117  virtual DataObjectPointer MakeOutput(unsigned int idx);
118 protected:
119  BoundaryResolver() : m_Face(0)
120  {
122  = static_cast<EquivalencyTable*>(this->MakeOutput(0).GetPointer());
123  this->SetNumberOfRequiredOutputs(1);
125  }
126  virtual ~BoundaryResolver() {}
128  void operator=(const Self&) {}
129  void PrintSelf(std::ostream& os, Indent indent) const;
130 
131  unsigned short m_Face;
132  void GenerateOutputRequestedRegion(DataObject *output);
133 };
134 
135 }// end namespace watershed
136 }// end namespace itk
137 
138 #ifndef ITK_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif

Generated at Sun Feb 3 2013 00:14:38 for Orfeo Toolbox with doxygen 1.8.1.1