Orfeo Toolbox  3.16
itkLabelReconstructionByDilationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkLabelReconstructionByDilationImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2006/03/28 19:59:05 $
7  Version: $Revision: 1.6 $
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 __itkLabelReconstructionByDilationImageFilter_h
18 #define __itkLabelReconstructionByDilationImageFilter_h
19 
20 #include "itkImageToImageFilter.h"
22 #include "itkLabelMap.h"
27 
28 
29 namespace itk {
30 
49 template<class TInputImage>
51  public ImageToImageFilter<TInputImage, TInputImage>
52 {
53 public:
60 
62  typedef TInputImage InputImageType;
63  typedef TInputImage OutputImageType;
64  typedef typename InputImageType::Pointer InputImagePointer;
65  typedef typename InputImageType::ConstPointer InputImageConstPointer;
66  typedef typename InputImageType::RegionType InputImageRegionType;
67  typedef typename InputImageType::PixelType InputImagePixelType;
68  typedef typename OutputImageType::Pointer OutputImagePointer;
69  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
70  typedef typename OutputImageType::RegionType OutputImageRegionType;
71  typedef typename OutputImageType::PixelType OutputImagePixelType;
72 
74  itkStaticConstMacro(InputImageDimension, unsigned int,
75  TInputImage::ImageDimension);
76  itkStaticConstMacro(OutputImageDimension, unsigned int,
77  TInputImage::ImageDimension);
78  itkStaticConstMacro(ImageDimension, unsigned int,
79  TInputImage::ImageDimension);
80 
87 
89  itkNewMacro(Self);
90 
94 
95 #ifdef ITK_USE_CONCEPT_CHECKING
96 
97  itkConceptMacro(InputEqualityComparableCheck,
99  itkConceptMacro(IntConvertibleToInputCheck,
101  itkConceptMacro(InputOStreamWritableCheck,
104 #endif
105 
110  itkSetMacro(BackgroundValue, OutputImagePixelType);
111  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
112 
114  void SetMarkerImage(InputImageType *input)
115  {
116  // Process object is not const-correct so the const casting is required.
117  this->SetNthInput( 0, const_cast<InputImageType *>(input) );
118  }
119 
121  InputImageType * GetMarkerImage()
122  {
123  return static_cast<InputImageType*>(const_cast<DataObject *>(this->ProcessObject::GetInput(0)));
124  }
125 
127  void SetMaskImage( const InputImageType *input)
128  {
129  // Process object is not const-correct so the const casting is required.
130  this->SetNthInput( 1, const_cast<InputImageType *>(input) );
131  }
132 
134  InputImageType * GetMaskImage()
135  {
136  return static_cast<InputImageType*>(const_cast<DataObject *>(this->ProcessObject::GetInput(1)));
137  }
138 
139 
140 protected:
143  void PrintSelf(std::ostream& os, Indent indent) const;
144 
148  void GenerateInputRequestedRegion() ;
149 
151  void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
152 
155  void GenerateData();
156 
157 
158 private:
159  LabelReconstructionByDilationImageFilter(const Self&); //purposely not implemented
160  void operator=(const Self&); //purposely not implemented
161 
163 
164 } ; // end of class
165 
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
170 #endif
171 
172 #endif
173 
174 

Generated at Sat Feb 2 2013 23:49:50 for Orfeo Toolbox with doxygen 1.8.1.1