ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkConnectedComponentFunctorImageFilter.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 __itkConnectedComponentFunctorImageFilter_h
19 #define __itkConnectedComponentFunctorImageFilter_h
20 
22 
23 namespace itk
24 {
53 template< class TInputImage, class TOutputImage, class TFunctor, class TMaskImage = TInputImage >
55  public ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >
56 {
57 public:
63 
67  typedef typename Superclass::InputImagePointer InputImagePointer;
68 
73  typedef typename TOutputImage::PixelType OutputPixelType;
74  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
75  typedef typename TInputImage::PixelType InputPixelType;
76  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
77  typedef typename TMaskImage::PixelType MaskPixelType;
78  itkStaticConstMacro(ImageDimension, unsigned int,
79  TOutputImage::ImageDimension);
80  itkStaticConstMacro(InputImageDimension, unsigned int,
81  TInputImage::ImageDimension);
83 
87  typedef TFunctor FunctorType;
88  typedef TInputImage InputImageType;
89  typedef TMaskImage MaskImageType;
90  typedef TOutputImage OutputImageType;
91 
92  typedef typename TInputImage::IndexType IndexType;
93  typedef typename TInputImage::SizeType SizeType;
94  typedef typename TOutputImage::RegionType RegionType;
95  typedef std::list< IndexType > ListType;
96 
97  typedef typename MaskImageType::Pointer MaskImagePointer;
98 
104 
109 
113  itkNewMacro(Self);
114 
119  FunctorType & GetFunctor() { return m_Functor; }
120  const FunctorType & GetFunctor() const { return m_Functor; }
122 
129  void SetFunctor(const FunctorType & functor)
130  {
131  m_Functor = functor;
132  this->Modified();
133  }
135 
136 #ifdef ITK_USE_CONCEPT_CHECKING
137 
138  itkConceptMacro( SameDimensionCheck,
140  itkConceptMacro( InputEqualityComparableCheck,
142  itkConceptMacro( OutputEqualityComparableCheck,
144  itkConceptMacro( OutputConvertibleToUnsignedIntCheck,
146  itkConceptMacro( OutputConvertibleToUnsignedLongCheck,
148  itkConceptMacro( OutputConvertibleToLongCheck,
150  itkConceptMacro( UnsignedLongConvertibleToOutputCheck,
152  itkConceptMacro( OutputIncrementDecrementOperatorsCheck,
154 
156 #endif
157 
158 protected:
162 
164 
168  void GenerateData();
169 };
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkConnectedComponentFunctorImageFilter.hxx"
174 #endif
175 
176 #endif
177