ITK  6.0.0
Insight Toolkit
itkKappaSigmaThresholdImageCalculator.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 itkKappaSigmaThresholdImageCalculator_h
19#define itkKappaSigmaThresholdImageCalculator_h
20
21#include "itkMacro.h"
22#include "itkImage.h"
23
24namespace itk
25{
51template <typename TInputImage, typename TMaskImage>
52class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageCalculator : public Object
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(KappaSigmaThresholdImageCalculator);
56
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(KappaSigmaThresholdImageCalculator);
68
70 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
71
73 using InputImageType = TInputImage;
74 using MaskImageType = TMaskImage;
75
81
82 using InputPixelType = typename InputImageType::PixelType;
83 using MaskPixelType = typename MaskImageType::PixelType;
84
86 itkSetConstObjectMacro(Image, InputImageType);
87
91 itkSetConstObjectMacro(Mask, MaskImageType);
92
96 itkSetMacro(MaskValue, MaskPixelType);
97 itkGetConstMacro(MaskValue, MaskPixelType);
101 itkSetMacro(SigmaFactor, double);
102 itkGetConstMacro(SigmaFactor, double);
106 itkSetMacro(NumberOfIterations, unsigned int);
107 itkGetConstMacro(NumberOfIterations, unsigned int);
111 void
113
115 const InputPixelType &
116 GetOutput() const;
117
118protected:
121 void
122 PrintSelf(std::ostream & os, Indent indent) const override;
123
124private:
125 bool m_Valid{ false }; // Have moments been computed yet?
126 MaskPixelType m_MaskValue{};
127 double m_SigmaFactor{ 2 };
128 unsigned int m_NumberOfIterations{ 2 };
129 InputPixelType m_Output{};
130
133};
134} // end namespace itk
135
136#ifndef ITK_MANUAL_INSTANTIATION
137# include "itkKappaSigmaThresholdImageCalculator.hxx"
138#endif
139
140#endif /* itkKappaSigmaThresholdImageCalculator_h */
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Computes a Kappa-Sigma-Clipping threshold for an image.
const InputPixelType & GetOutput() const
typename InputImageType::ConstPointer InputImageConstPointer
~KappaSigmaThresholdImageCalculator() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename MaskImageType::ConstPointer MaskImageConstPointer
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....