ITK  6.0.0
Insight Toolkit
itkDoubleThresholdImageFilter.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 itkDoubleThresholdImageFilter_h
19#define itkDoubleThresholdImageFilter_h
20
22
23namespace itk
24{
53template <typename TInputImage, typename TOutputImage>
54class ITK_TEMPLATE_EXPORT DoubleThresholdImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(DoubleThresholdImageFilter);
58
64
66 itkNewMacro(Self);
67
69 itkOverrideGetNameOfClassMacro(DoubleThresholdImageFilter);
70
72 using typename Superclass::InputImagePointer;
73 using typename Superclass::InputImageType;
74
76 using InputPixelType = typename TInputImage::PixelType;
77 using OutputPixelType = typename TOutputImage::PixelType;
78
81 itkSetMacro(OutsideValue, OutputPixelType);
82
84 itkGetConstMacro(OutsideValue, OutputPixelType);
85
88 itkSetMacro(InsideValue, OutputPixelType);
89
91 itkGetConstMacro(InsideValue, OutputPixelType);
92
98 itkSetMacro(Threshold1, InputPixelType);
99 itkSetMacro(Threshold2, InputPixelType);
100 itkSetMacro(Threshold3, InputPixelType);
101 itkSetMacro(Threshold4, InputPixelType);
105 itkGetConstMacro(Threshold1, InputPixelType);
106 itkGetConstMacro(Threshold2, InputPixelType);
107 itkGetConstMacro(Threshold3, InputPixelType);
108 itkGetConstMacro(Threshold4, InputPixelType);
117 itkSetMacro(FullyConnected, bool);
118 itkGetConstReferenceMacro(FullyConnected, bool);
119 itkBooleanMacro(FullyConnected);
122#ifdef ITK_USE_CONCEPT_CHECKING
123 // Begin concept checking
124 itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
126 itkConceptMacro(InputOStreamWritableCheck, (Concept::OStreamWritable<InputPixelType>));
127 itkConceptMacro(OutputOStreamWritableCheck, (Concept::OStreamWritable<OutputPixelType>));
128 // End concept checking
129#endif
130
131protected:
133 ~DoubleThresholdImageFilter() override = default;
134 void
135 PrintSelf(std::ostream & os, Indent indent) const override;
136
139 void
141
144 void
145 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
146
150 void
151 GenerateData() override;
152
153private:
154 InputPixelType m_Threshold1{};
155 InputPixelType m_Threshold2{};
156 InputPixelType m_Threshold3{};
157 InputPixelType m_Threshold4{};
158
159 OutputPixelType m_InsideValue{};
160 OutputPixelType m_OutsideValue{};
161
162 unsigned long m_NumberOfIterationsUsed{ 1 };
163
164 bool m_FullyConnected{};
165};
166} // end namespace itk
167
168#ifndef ITK_MANUAL_INSTANTIATION
169# include "itkDoubleThresholdImageFilter.hxx"
170#endif
171
172#endif
Base class for all data objects in ITK.
Binarize an input image using double thresholding.
typename TInputImage::PixelType InputPixelType
~DoubleThresholdImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateInputRequestedRegion() override
void EnlargeOutputRequestedRegion(DataObject *) override
typename TOutputImage::PixelType OutputPixelType
Base class for all process objects that output image data.
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....