ITK  5.0.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  ITK_DISALLOW_COPY_AND_ASSIGN(HardConnectedComponentImageFilter);
54 
62 
67  using OutputPixelType = typename TOutputImage::PixelType;
68  using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
69  using InputPixelType = typename TInputImage::PixelType;
70  using InputInternalPixelType = typename TInputImage::InternalPixelType;
71  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
72  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
73 
77  using InputImageType = TInputImage;
78  using OutputImageType = TOutputImage;
80  using SizeType = typename TInputImage::SizeType;
82  using ListType = std::list< IndexType >;
83 
88 
92  itkNewMacro(Self);
93 
95  void SetObjectSeed(const IndexType & seed)
96  { m_Seeds.push_front(seed); }
97 
98 #ifdef ITK_USE_CONCEPT_CHECKING
99  // Begin concept checking
100  itkConceptMacro( SameDimensionCheck,
102  itkConceptMacro( IntConvertibleToOutputCheck,
104  itkConceptMacro( UnsignedShortConvertibleToOutputCheck,
106  itkConceptMacro( OutputEqualityComparableCheck,
108  itkConceptMacro( UnsignedCharConvertibleToOutputCheck,
110  itkConceptMacro( OutputIncrementDecrementOperatorsCheck,
112  // End concept checking
113 #endif
114 
115 protected:
117  ~HardConnectedComponentImageFilter() override = default;
118 
122  void GenerateData() override;
123 
124  void PrintSelf(std::ostream & os, Indent indent) const override
125  { Superclass::PrintSelf(os, indent); }
126 
127 private:
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkHardConnectedComponentImageFilter.hxx"
134 #endif
135 
136 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename TOutputImage::InternalPixelType OutputInternalPixelType
Base class for all process objects that output image data.
TOutputImage OutputImageType
void PrintSelf(std::ostream &os, Indent indent) const override
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)
typename TInputImage::InternalPixelType InputInternalPixelType