ITK  6.0.0
Insight Toolkit
itkHardConnectedComponentImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
22#include "itkImage.h"
23
24namespace itk
25{
48template <typename TInputImage, typename TOutputImage>
49class ITK_TEMPLATE_EXPORT HardConnectedComponentImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
50{
51public:
52 ITK_DISALLOW_COPY_AND_MOVE(HardConnectedComponentImageFilter);
53
61
66 using OutputPixelType = typename TOutputImage::PixelType;
67 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
68 using InputPixelType = typename TInputImage::PixelType;
69 using InputInternalPixelType = typename TInputImage::InternalPixelType;
70 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
71 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
72
76 using InputImageType = TInputImage;
77 using OutputImageType = TOutputImage;
81 using ListType = std::list<IndexType>;
82
86 itkOverrideGetNameOfClassMacro(HardConnectedComponentImageFilter);
87
91 itkNewMacro(Self);
92
94 void
96 {
97 m_Seeds.push_front(seed);
98 }
99
100#ifdef ITK_USE_CONCEPT_CHECKING
101 // Begin concept checking
103 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, OutputPixelType>));
104 itkConceptMacro(UnsignedShortConvertibleToOutputCheck, (Concept::Convertible<unsigned short, OutputPixelType>));
105 itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
106 itkConceptMacro(UnsignedCharConvertibleToOutputCheck, (Concept::Convertible<unsigned char, OutputPixelType>));
107 itkConceptMacro(OutputIncrementDecrementOperatorsCheck, (Concept::IncrementDecrementOperators<OutputPixelType>));
108 // End concept checking
109#endif
110
111protected:
114
118 void
119 GenerateData() override;
120
121 void
122 PrintSelf(std::ostream & os, Indent indent) const override
123 {
124 Superclass::PrintSelf(os, indent);
125 }
126
127private:
128 ListType m_Seeds{};
129};
130} // end namespace itk
131
132#ifndef ITK_MANUAL_INSTANTIATION
133# include "itkHardConnectedComponentImageFilter.hxx"
134#endif
135
136#endif
typename TOutputImage::InternalPixelType OutputInternalPixelType
~HardConnectedComponentImageFilter() override=default
typename TInputImage::InternalPixelType InputInternalPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....