ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkThresholdImageFilter.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/*=========================================================================
19 *
20 * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21 *
22 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23 *
24 * For complete copyright, license and disclaimer of warranty information
25 * please refer to the NOTICE file at the top of the ITK source tree.
26 *
27 *=========================================================================*/
28#ifndef itkThresholdImageFilter_h
29#define itkThresholdImageFilter_h
30
32
33#include "itkConceptChecking.h"
34
35namespace itk
36{
70template <typename TImage>
71class ITK_TEMPLATE_EXPORT ThresholdImageFilter : public InPlaceImageFilter<TImage, TImage>
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(ThresholdImageFilter);
75
81
83 itkNewMacro(Self);
84
86 itkOverrideGetNameOfClassMacro(ThresholdImageFilter);
87
89 using PixelType = typename TImage::PixelType;
90
92 itkConceptMacro(PixelTypeComparableCheck, (Concept::Comparable<PixelType>));
93 itkConceptMacro(PixelTypeOStreamWritableCheck, (Concept::OStreamWritable<PixelType>));
95
98 itkSetMacro(OutsideValue, PixelType);
99
101 itkGetConstMacro(OutsideValue, PixelType);
102
104 void
105 ThresholdAbove(const PixelType & threshold);
106
108 void
109 ThresholdBelow(const PixelType & threshold);
110
112 void
113 ThresholdOutside(const PixelType & lower, const PixelType & upper);
114
116 itkSetMacro(Lower, PixelType);
117 itkGetConstMacro(Lower, PixelType);
119
121 itkSetMacro(Upper, PixelType);
122 itkGetConstMacro(Upper, PixelType);
124
126 using InputImageType = TImage;
127 using InputImagePointer = typename InputImageType::ConstPointer;
128 using InputImageRegionType = typename InputImageType::RegionType;
129 using InputImagePixelType = typename InputImageType::PixelType;
130
132 using OutputImageType = TImage;
133 using OutputImagePointer = typename OutputImageType::Pointer;
134 using OutputImageRegionType = typename OutputImageType::RegionType;
135 using OutputImagePixelType = typename OutputImageType::PixelType;
136
137protected:
139 ~ThresholdImageFilter() override = default;
140 void
141 PrintSelf(std::ostream & os, Indent indent) const override;
142
153 void
154 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
155
156private:
160};
161} // end namespace itk
162
163#ifndef ITK_MANUAL_INSTANTIATION
164# include "itkThresholdImageFilter.hxx"
165#endif
166
167#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
void ThresholdAbove(const PixelType &threshold)
typename InputImageType::RegionType InputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
void ThresholdBelow(const PixelType &threshold)
typename OutputImageType::RegionType OutputImageRegionType
typename InputImageType::ConstPointer InputImagePointer
typename OutputImageType::PixelType OutputImagePixelType
typename TImage::PixelType PixelType
InPlaceImageFilter< TImage, TImage > Superclass
typename OutputImageType::Pointer OutputImagePointer
SmartPointer< const Self > ConstPointer
~ThresholdImageFilter() override=default
void ThresholdOutside(const PixelType &lower, const PixelType &upper)
typename InputImageType::PixelType InputImagePixelType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....