ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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;
78 using IndexType = typename TInputImage::IndexType;
79 using SizeType = typename TInputImage::SizeType;
80 using RegionType = typename TOutputImage::RegionType;
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
101 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, OutputPixelType>));
102 itkConceptMacro(UnsignedShortConvertibleToOutputCheck, (Concept::Convertible<unsigned short, OutputPixelType>));
103 itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
104 itkConceptMacro(UnsignedCharConvertibleToOutputCheck, (Concept::Convertible<unsigned char, OutputPixelType>));
105 itkConceptMacro(OutputIncrementDecrementOperatorsCheck, (Concept::IncrementDecrementOperators<OutputPixelType>));
106
107protected:
110
114 void
115 GenerateData() override;
116
117 void
118 PrintSelf(std::ostream & os, Indent indent) const override
119 {
120 Superclass::PrintSelf(os, indent);
121 }
122
123private:
125};
126} // end namespace itk
127
128#ifndef ITK_MANUAL_INSTANTIATION
129# include "itkHardConnectedComponentImageFilter.hxx"
130#endif
131
132#endif
typename TOutputImage::InternalPixelType OutputInternalPixelType
~HardConnectedComponentImageFilter() override=default
typename TInputImage::InternalPixelType InputInternalPixelType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....