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 
24 namespace itk
25 {
51 template <typename TInputImage, typename TMaskImage>
52 class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageCalculator : public Object
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(KappaSigmaThresholdImageCalculator);
56 
59  using Superclass = Object;
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
112  Compute();
113 
115  const InputPixelType &
116  GetOutput() const;
117 
118 protected:
120  ~KappaSigmaThresholdImageCalculator() override = default;
121  void
122  PrintSelf(std::ostream & os, Indent indent) const override;
123 
124 private:
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 */
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::KappaSigmaThresholdImageCalculator::MaskImageConstPointer
typename MaskImageType::ConstPointer MaskImageConstPointer
Definition: itkKappaSigmaThresholdImageCalculator.h:80
itk::KappaSigmaThresholdImageCalculator::MaskPixelType
typename MaskImageType::PixelType MaskPixelType
Definition: itkKappaSigmaThresholdImageCalculator.h:83
itkImage.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::KappaSigmaThresholdImageCalculator::MaskImageType
TMaskImage MaskImageType
Definition: itkKappaSigmaThresholdImageCalculator.h:74
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::KappaSigmaThresholdImageCalculator
Computes a Kappa-Sigma-Clipping threshold for an image.
Definition: itkKappaSigmaThresholdImageCalculator.h:52
itkMacro.h
itk::KappaSigmaThresholdImageCalculator::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkKappaSigmaThresholdImageCalculator.h:82
itk::KappaSigmaThresholdImageCalculator::MaskImagePointer
typename MaskImageType::Pointer MaskImagePointer
Definition: itkKappaSigmaThresholdImageCalculator.h:79
itk::KappaSigmaThresholdImageCalculator::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkKappaSigmaThresholdImageCalculator.h:77
itk::KappaSigmaThresholdImageCalculator::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkKappaSigmaThresholdImageCalculator.h:78
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::KappaSigmaThresholdImageCalculator::InputImageType
TInputImage InputImageType
Definition: itkKappaSigmaThresholdImageCalculator.h:73