ITK  5.2.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  * http://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 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
53 template <typename TInputImage, typename TOutputImage>
54 class ITK_TEMPLATE_EXPORT DoubleThresholdImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_MOVE(DoubleThresholdImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
70 
72  using InputImagePointer = typename Superclass::InputImagePointer;
73  using InputImageType = 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);
103 
105  itkGetConstMacro(Threshold1, InputPixelType);
106  itkGetConstMacro(Threshold2, InputPixelType);
107  itkGetConstMacro(Threshold3, InputPixelType);
108  itkGetConstMacro(Threshold4, InputPixelType);
110 
117  itkSetMacro(FullyConnected, bool);
118  itkGetConstReferenceMacro(FullyConnected, bool);
119  itkBooleanMacro(FullyConnected);
121 
122 #ifdef ITK_USE_CONCEPT_CHECKING
123  // Begin concept checking
124  itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
125  itkConceptMacro(InputComparableCheck, (Concept::Comparable<InputPixelType>));
126  itkConceptMacro(InputOStreamWritableCheck, (Concept::OStreamWritable<InputPixelType>));
127  itkConceptMacro(OutputOStreamWritableCheck, (Concept::OStreamWritable<OutputPixelType>));
128  // End concept checking
129 #endif
130 
131 protected:
133  ~DoubleThresholdImageFilter() override = default;
134  void
135  PrintSelf(std::ostream & os, Indent indent) const override;
136 
139  void
140  GenerateInputRequestedRegion() override;
141 
144  void
145  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
146 
150  void
151  GenerateData() override;
152 
153 private:
158 
161 
162  unsigned long m_NumberOfIterationsUsed{ 1 };
163 
165 };
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 # include "itkDoubleThresholdImageFilter.hxx"
170 #endif
171 
172 #endif
itk::DoubleThresholdImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkDoubleThresholdImageFilter.h:77
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:636
itk::DoubleThresholdImageFilter::m_InsideValue
OutputPixelType m_InsideValue
Definition: itkDoubleThresholdImageFilter.h:159
itk::DoubleThresholdImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkDoubleThresholdImageFilter.h:76
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::DoubleThresholdImageFilter
Binarize an input image using double thresholding.
Definition: itkDoubleThresholdImageFilter.h:54
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::DoubleThresholdImageFilter::m_FullyConnected
bool m_FullyConnected
Definition: itkDoubleThresholdImageFilter.h:164
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::DoubleThresholdImageFilter::m_Threshold3
InputPixelType m_Threshold3
Definition: itkDoubleThresholdImageFilter.h:156
itk::DoubleThresholdImageFilter::m_OutsideValue
OutputPixelType m_OutsideValue
Definition: itkDoubleThresholdImageFilter.h:160
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::DoubleThresholdImageFilter::m_Threshold1
InputPixelType m_Threshold1
Definition: itkDoubleThresholdImageFilter.h:154
itk::Concept::Comparable
Definition: itkConceptChecking.h:330
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:306
itk::DoubleThresholdImageFilter::m_Threshold4
InputPixelType m_Threshold4
Definition: itkDoubleThresholdImageFilter.h:157
itk::DoubleThresholdImageFilter::m_Threshold2
InputPixelType m_Threshold2
Definition: itkDoubleThresholdImageFilter.h:155
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293