ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkDoubleThresholdImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
55  public ImageToImageFilter< TInputImage, TOutputImage >
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(DoubleThresholdImageFilter);
59 
65 
67  itkNewMacro(Self);
68 
71 
73  using InputImagePointer = typename Superclass::InputImagePointer;
74  using InputImageType = typename Superclass::InputImageType;
75 
77  using InputPixelType = typename TInputImage::PixelType;
78  using OutputPixelType = typename TOutputImage::PixelType;
79 
82  itkSetMacro(OutsideValue, OutputPixelType);
83 
85  itkGetConstMacro(OutsideValue, OutputPixelType);
86 
89  itkSetMacro(InsideValue, OutputPixelType);
90 
92  itkGetConstMacro(InsideValue, OutputPixelType);
93 
99  itkSetMacro(Threshold1, InputPixelType);
100  itkSetMacro(Threshold2, InputPixelType);
101  itkSetMacro(Threshold3, InputPixelType);
102  itkSetMacro(Threshold4, InputPixelType);
104 
106  itkGetConstMacro(Threshold1, InputPixelType);
107  itkGetConstMacro(Threshold2, InputPixelType);
108  itkGetConstMacro(Threshold3, InputPixelType);
109  itkGetConstMacro(Threshold4, InputPixelType);
111 
118  itkSetMacro(FullyConnected, bool);
119  itkGetConstReferenceMacro(FullyConnected, bool);
120  itkBooleanMacro(FullyConnected);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124  // Begin concept checking
125  itkConceptMacro( OutputEqualityComparableCheck,
127  itkConceptMacro( InputComparableCheck,
129  itkConceptMacro( InputOStreamWritableCheck,
131  itkConceptMacro( OutputOStreamWritableCheck,
133  // End concept checking
134 #endif
135 
136 protected:
138  ~DoubleThresholdImageFilter() override = default;
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
143  void GenerateInputRequestedRegion() override;
144 
147  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override;
148 
152  void GenerateData() override;
153 
154 private:
159 
162 
163  unsigned long m_NumberOfIterationsUsed{1};
164 
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkDoubleThresholdImageFilter.hxx"
171 #endif
172 
173 #endif
typename TInputImage::PixelType InputPixelType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename InputImageType::Pointer InputImagePointer
typename TOutputImage::PixelType OutputPixelType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Binarize an input image using double thresholding.
Base class for all data objects in ITK.