ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkHardConnectedComponentImageFilter.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 __itkHardConnectedComponentImageFilter_h
19 #define __itkHardConnectedComponentImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
48 template< class TInputImage, class TOutputImage >
50  public ImageToImageFilter< TInputImage, TOutputImage >
51 {
52 public:
53 
59 
64  typedef typename TOutputImage::PixelType OutputPixelType;
65  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
66  typedef typename TInputImage::PixelType InputPixelType;
67  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
68  itkStaticConstMacro(InputImageDimension, unsigned int,
69  TInputImage::ImageDimension);
70  itkStaticConstMacro(ImageDimension, unsigned int,
71  TOutputImage::ImageDimension);
73 
77  typedef TInputImage InputImageType;
78  typedef TOutputImage OutputImageType;
79  typedef typename TInputImage::IndexType IndexType;
80  typedef typename TInputImage::SizeType SizeType;
81  typedef typename TOutputImage::RegionType RegionType;
82  typedef std::list< IndexType > ListType;
83 
89 
94 
98  itkNewMacro(Self);
99 
101  void SetObjectSeed(const IndexType & seed)
102  { m_Seeds.push_front(seed); }
103 
104 #ifdef ITK_USE_CONCEPT_CHECKING
105 
106  itkConceptMacro( SameDimensionCheck,
108  itkConceptMacro( IntConvertibleToOutputCheck,
110  itkConceptMacro( UnsignedShortConvertibleToOutputCheck,
112  itkConceptMacro( OutputEqualityComparableCheck,
114  itkConceptMacro( UnsignedCharConvertibleToOutputCheck,
116  itkConceptMacro( OutputIncrementDecrementOperatorsCheck,
118 
120 #endif
121 
122 protected:
125 
129  void GenerateData();
130 
131  void PrintSelf(std::ostream & os, Indent indent) const
132  { Superclass::PrintSelf(os, indent); }
133 
134 private:
135  HardConnectedComponentImageFilter(const Self &); //purposely not implemented
136  void operator=(const Self &); //purposely not implemented
137 
139 };
140 } // end namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 #include "itkHardConnectedComponentImageFilter.hxx"
144 #endif
145 
146 #endif
147