Orfeo Toolbox  3.16
itkMorphologicalWatershedFromMarkersImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkMorphologicalWatershedFromMarkersImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2009-01-28 18:14:36 $
7  Version: $Revision: 1.4 $
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 __itkMorphologicalWatershedFromMarkersImageFilter_h
18 #define __itkMorphologicalWatershedFromMarkersImageFilter_h
19 
20 #include "itkImageToImageFilter.h"
21 
22 namespace itk {
23 
71 template<class TInputImage, class TLabelImage>
73  public ImageToImageFilter<TInputImage, TLabelImage>
74 {
75 public:
81 
83  typedef TInputImage InputImageType;
84  typedef TLabelImage LabelImageType;
85  typedef typename InputImageType::Pointer InputImagePointer;
86  typedef typename InputImageType::ConstPointer InputImageConstPointer;
87  typedef typename InputImageType::RegionType InputImageRegionType;
88  typedef typename InputImageType::PixelType InputImagePixelType;
89  typedef typename LabelImageType::Pointer LabelImagePointer;
90  typedef typename LabelImageType::ConstPointer LabelImageConstPointer;
91  typedef typename LabelImageType::RegionType LabelImageRegionType;
92  typedef typename LabelImageType::PixelType LabelImagePixelType;
93 
94  typedef typename LabelImageType::IndexType IndexType;
95 
97  itkStaticConstMacro(ImageDimension, unsigned int,
98  TInputImage::ImageDimension);
99 
101  itkNewMacro(Self);
102 
106 
107 
109  void SetMarkerImage(const TLabelImage *input)
110  {
111  // Process object is not const-correct so the const casting is required.
112  this->SetNthInput( 1, const_cast<TLabelImage *>(input) );
113  }
114 
116  const LabelImageType * GetMarkerImage() const
117  {
118  return static_cast<LabelImageType*>(
119  const_cast<DataObject *>(this->ProcessObject::GetInput(1)));
120  }
121 
123  void SetInput1(const TInputImage *input)
124  {
125  this->SetInput( input );
126  }
127 
129  void SetInput2(const TLabelImage *input)
130  {
131  this->SetMarkerImage( input );
132  }
133 
140  itkSetMacro(FullyConnected, bool);
141  itkGetConstReferenceMacro(FullyConnected, bool);
142  itkBooleanMacro(FullyConnected);
143 
149  itkSetMacro(MarkWatershedLine, bool);
150  itkGetConstReferenceMacro(MarkWatershedLine, bool);
151  itkBooleanMacro(MarkWatershedLine);
152 
153 protected:
156  void PrintSelf(std::ostream& os, Indent indent) const;
157 
161  void GenerateInputRequestedRegion();
162 
166  void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
167 
169  void GenerateData();
170 
171 private:
172  //purposely not implemented
174  void operator=(const Self&); //purposely not implemented
175 
177 
179 
180 }; // end of class
181 
182 } // end namespace itk
183 
184 #ifndef ITK_MANUAL_INSTANTIATION
186 #endif
187 
188 #endif

Generated at Sat May 18 2013 23:54:16 for Orfeo Toolbox with doxygen 1.8.3.1