ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkConnectedComponentFunctorImageFilter.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 itkConnectedComponentFunctorImageFilter_h
19#define itkConnectedComponentFunctorImageFilter_h
20
22
23namespace itk
24{
52
53template <typename TInputImage, typename TOutputImage, typename TFunctor, typename TMaskImage = TInputImage>
54class ITK_TEMPLATE_EXPORT ConnectedComponentFunctorImageFilter
55 : public ConnectedComponentImageFilter<TInputImage, TOutputImage, TMaskImage>
56{
57public:
63
67 using typename Superclass::InputImagePointer;
68
73 using OutputPixelType = typename TOutputImage::PixelType;
74 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
75 using InputPixelType = typename TInputImage::PixelType;
76 using InputInternalPixelType = typename TInputImage::InternalPixelType;
77 using MaskPixelType = typename TMaskImage::PixelType;
78 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
79 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
80
84 using FunctorType = TFunctor;
85 using InputImageType = TInputImage;
86 using MaskImageType = TMaskImage;
87 using OutputImageType = TOutputImage;
88
89 using IndexType = typename TInputImage::IndexType;
90 using SizeType = typename TInputImage::SizeType;
91 using RegionType = typename TOutputImage::RegionType;
92 using ListType = std::list<IndexType>;
93
94 using MaskImagePointer = typename MaskImageType::Pointer;
95
101
105 itkOverrideGetNameOfClassMacro(ConnectedComponentFunctorImageFilter);
106
110 itkNewMacro(Self);
111
118 {
119 return m_Functor;
120 }
121 const FunctorType &
123 {
124 return m_Functor;
125 }
126
127
134 void
135 SetFunctor(const FunctorType & functor)
136 {
137 m_Functor = functor;
138 this->Modified();
139 }
140
141
143 itkConceptMacro(InputEqualityComparableCheck, (Concept::EqualityComparable<InputPixelType>));
144 itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
145 itkConceptMacro(OutputConvertibleToUnsignedIntCheck, (Concept::Convertible<OutputPixelType, unsigned int>));
146 itkConceptMacro(OutputConvertibleToUnsignedLongCheck, (Concept::Convertible<OutputPixelType, unsigned long>));
147 itkConceptMacro(OutputConvertibleToLongCheck, (Concept::Convertible<OutputPixelType, long>));
148 itkConceptMacro(UnsignedLongConvertibleToOutputCheck, (Concept::Convertible<unsigned long, OutputPixelType>));
149 itkConceptMacro(OutputIncrementDecrementOperatorsCheck, (Concept::IncrementDecrementOperators<OutputPixelType>));
150
151protected:
155
157
161 void
162 GenerateData() override;
163};
164} // end namespace itk
165
166#ifndef ITK_MANUAL_INSTANTIATION
167# include "itkConnectedComponentFunctorImageFilter.hxx"
168#endif
169
170#endif
~ConnectedComponentFunctorImageFilter() override=default
typename TOutputImage::InternalPixelType OutputInternalPixelType
ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > Superclass
typename TInputImage::InternalPixelType InputInternalPixelType
virtual void Modified() const
Implements transparent reference counting.
Functor::Add2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > FunctorType
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....