ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkKappaSigmaThresholdImageCalculator.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 itkKappaSigmaThresholdImageCalculator_h
19 #define itkKappaSigmaThresholdImageCalculator_h
20 
21 #include "itkMacro.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
50 template< typename TInputImage, typename TMaskImage >
51 class ITK_TEMPLATE_EXPORT KappaSigmaThresholdImageCalculator:public Object
52 {
53 public:
56  typedef Object Superclass;
59 
61  itkNewMacro(Self);
62 
65 
67  itkStaticConstMacro(ImageDimension, unsigned int,
68  TInputImage::ImageDimension);
69 
71  typedef TInputImage InputImageType;
72  typedef TMaskImage MaskImageType;
73 
75  typedef typename InputImageType::Pointer InputImagePointer;
76  typedef typename InputImageType::ConstPointer InputImageConstPointer;
77  typedef typename MaskImageType::Pointer MaskImagePointer;
78  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
79 
80  typedef typename InputImageType::PixelType InputPixelType;
81  typedef typename MaskImageType::PixelType MaskPixelType;
82 
84  itkSetConstObjectMacro(Image, InputImageType);
85 
89  itkSetConstObjectMacro(Mask, MaskImageType);
90 
94  itkSetMacro(MaskValue, MaskPixelType);
95  itkGetConstMacro(MaskValue, MaskPixelType);
97 
99  itkSetMacro(SigmaFactor, double);
100  itkGetConstMacro(SigmaFactor, double);
102 
104  itkSetMacro(NumberOfIterations, unsigned int);
105  itkGetConstMacro(NumberOfIterations, unsigned int);
107 
109  void Compute();
110 
112  const InputPixelType & GetOutput() const;
113 
114 protected:
116  virtual ~KappaSigmaThresholdImageCalculator() ITK_OVERRIDE {}
117  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
118 
119 private:
120  ITK_DISALLOW_COPY_AND_ASSIGN(KappaSigmaThresholdImageCalculator);
121 
122  bool m_Valid; // Have moments been computed yet?
125  unsigned int m_NumberOfIterations;
127 
130 };
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkKappaSigmaThresholdImageCalculator.hxx"
135 #endif
136 
137 #endif /* itkKappaSigmaThresholdImageCalculator_h */
Light weight base class for most itk classes.
Computes a Kappa-Sigma-Clipping threshold for an image.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:59
Templated n-dimensional image class.
Definition: itkImage.h:75