ITK  4.13.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< typename TInputImage, typename TOutputImage >
49 class ITK_TEMPLATE_EXPORT HardConnectedComponentImageFilter:
50  public ImageToImageFilter< TInputImage, TOutputImage >
51 {
52 public:
53 
61 
66  typedef typename TOutputImage::PixelType OutputPixelType;
67  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
68  typedef typename TInputImage::PixelType InputPixelType;
69  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
70  itkStaticConstMacro(InputImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72  itkStaticConstMacro(ImageDimension, unsigned int,
73  TOutputImage::ImageDimension);
75 
79  typedef TInputImage InputImageType;
80  typedef TOutputImage OutputImageType;
82  typedef typename TInputImage::SizeType SizeType;
83  typedef typename TOutputImage::RegionType RegionType;
84  typedef std::list< IndexType > ListType;
85 
90 
94  itkNewMacro(Self);
95 
97  void SetObjectSeed(const IndexType & seed)
98  { m_Seeds.push_front(seed); }
99 
100 #ifdef ITK_USE_CONCEPT_CHECKING
101  // Begin concept checking
102  itkConceptMacro( SameDimensionCheck,
104  itkConceptMacro( IntConvertibleToOutputCheck,
106  itkConceptMacro( UnsignedShortConvertibleToOutputCheck,
108  itkConceptMacro( OutputEqualityComparableCheck,
110  itkConceptMacro( UnsignedCharConvertibleToOutputCheck,
112  itkConceptMacro( OutputIncrementDecrementOperatorsCheck,
114  // End concept checking
115 #endif
116 
117 protected:
119  virtual ~HardConnectedComponentImageFilter() ITK_OVERRIDE {}
120 
124  void GenerateData() ITK_OVERRIDE;
125 
126  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
127  { Superclass::PrintSelf(os, indent); }
128 
129 private:
130  ITK_DISALLOW_COPY_AND_ASSIGN(HardConnectedComponentImageFilter);
131 
133 };
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkHardConnectedComponentImageFilter.hxx"
138 #endif
139 
140 #endif
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)