ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkConnectedThresholdImageFilter.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 itkConnectedThresholdImageFilter_h
19#define itkConnectedThresholdImageFilter_h
20
23#include "ITKRegionGrowingExport.h"
24
25namespace itk
26{
33{
34public:
43 enum class Connectivity : uint8_t
44 {
47 };
48};
49
50// Define how to print enumeration
51extern ITKRegionGrowing_EXPORT std::ostream &
67template <typename TInputImage, typename TOutputImage>
68class ITK_TEMPLATE_EXPORT ConnectedThresholdImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
69{
70public:
71 ITK_DISALLOW_COPY_AND_MOVE(ConnectedThresholdImageFilter);
72
78
80 itkNewMacro(Self);
81
83 itkOverrideGetNameOfClassMacro(ConnectedThresholdImageFilter);
84
85 using InputImageType = TInputImage;
86 using InputImagePointer = typename InputImageType::Pointer;
87 using InputImageConstPointer = typename InputImageType::ConstPointer;
88 using InputImageRegionType = typename InputImageType::RegionType;
89 using InputImagePixelType = typename InputImageType::PixelType;
90 using IndexType = typename InputImageType::IndexType;
91 using SeedContainerType = std::vector<IndexType>;
93 using SizeType = typename InputImageType::SizeType;
94
95 using OutputImageType = TOutputImage;
96 using OutputImagePointer = typename OutputImageType::Pointer;
97 using OutputImageRegionType = typename OutputImageType::RegionType;
98 using OutputImagePixelType = typename OutputImageType::PixelType;
99
100 void
101 PrintSelf(std::ostream & os, Indent indent) const override;
102
104 void
105 SetSeed(const IndexType & seed);
106
107 void
108 AddSeed(const IndexType & seed);
109
111 void
113
116 itkSetMacro(Seeds, SeedsContainerType);
117 itkGetConstReferenceMacro(Seeds, SeedsContainerType);
119
124 itkSetMacro(ReplaceValue, OutputImagePixelType);
125 itkGetConstMacro(ReplaceValue, OutputImagePixelType);
129
137 virtual void
139 virtual void
144 virtual InputImagePixelType
145 GetUpper() const;
146 virtual InputImagePixelType
147 GetLower() const;
151 virtual InputPixelObjectType *
153 virtual InputPixelObjectType *
157 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
158 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
159
166
168#if !defined(ITK_LEGACY_REMOVE)
169 using ConnectivityEnumType = ConnectedThresholdImageFilterEnums::Connectivity;
171 static constexpr ConnectedThresholdImageFilterEnums::Connectivity FaceConnectivity =
173 static constexpr ConnectedThresholdImageFilterEnums::Connectivity FullConnectivity =
175#endif
176
183protected:
185 ~ConnectedThresholdImageFilter() override = default;
186
187 // Override since the filter needs all the data for the algorithm.
188 void
190
191 // Override since the filter produces the entire dataset.
192 void
194
195 void
196 GenerateData() override;
197
198private:
200
202
204};
205} // end namespace itk
206
207#ifndef ITK_MANUAL_INSTANTIATION
208# include "itkConnectedThresholdImageFilter.hxx"
209#endif
210
211#endif
Contains all the enum classes used by the ConnectedThresholdImageFilter class.
ConnectedThresholdImageFilterEnums::Connectivity m_Connectivity
ConnectedThresholdImageFilterEnums::Connectivity ConnectivityEnum
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::Pointer InputImagePointer
virtual void SetLower(InputImagePixelType)
typename OutputImageType::RegionType OutputImageRegionType
virtual void SetLowerInput(const InputPixelObjectType *)
virtual void SetUpper(InputImagePixelType)
void AddSeed(const IndexType &seed)
void SetSeed(const IndexType &seed)
void GenerateInputRequestedRegion() override
virtual InputPixelObjectType * GetUpperInput()
SimpleDataObjectDecorator< InputImagePixelType > InputPixelObjectType
typename InputImageType::IndexType IndexType
~ConnectedThresholdImageFilter() override=default
virtual void SetUpperInput(const InputPixelObjectType *)
virtual InputImagePixelType GetLower() const
typename OutputImageType::PixelType OutputImagePixelType
virtual InputImagePixelType GetUpper() const
void PrintSelf(std::ostream &os, Indent indent) const override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
typename InputImageType::PixelType InputImagePixelType
virtual InputPixelObjectType * GetLowerInput()
typename InputImageType::ConstPointer InputImageConstPointer
void EnlargeOutputRequestedRegion(DataObject *output) override
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Definition itkIndent.h:51
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, AnatomicalOrientation::CoordinateEnum value)