ITK  4.10.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 >
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:
117  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
118 
119 private:
120  KappaSigmaThresholdImageCalculator(const Self &) ITK_DELETE_FUNCTION;
121  void operator=(const Self &) ITK_DELETE_FUNCTION;
122 
123  bool m_Valid; // Have moments been computed yet?
124  MaskPixelType m_MaskValue;
126  unsigned int m_NumberOfIterations;
127  InputPixelType m_Output;
128 
129  InputImageConstPointer m_Image;
130  MaskImageConstPointer m_Mask;
131 }; // class KappaSigmaThresholdImageCalculator
132 } // end namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 #include "itkKappaSigmaThresholdImageCalculator.hxx"
136 #endif
137 
138 #endif /* itkKappaSigmaThresholdImageCalculator_h */
virtual void PrintSelf(std::ostream &os, Indent indent) const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
Computes a Kappa-Sigma-Clipping threshold for an image.
void operator=(const Self &) ITK_DELETE_FUNCTION
Control indentation during Print() invocation.
Definition: itkIndent.h:49
const InputPixelType & GetOutput() const
Base class for most ITK classes.
Definition: itkObject.h:57
Templated n-dimensional image class.
Definition: itkImage.h:75