ITK  4.4.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 {
39 template< class TInputImage, class TMaskImage >
41 {
42 public:
45  typedef Object Superclass;
48 
50  itkNewMacro(Self);
51 
54 
56  itkStaticConstMacro(ImageDimension, unsigned int,
57  TInputImage::ImageDimension);
58 
60  typedef TInputImage InputImageType;
61  typedef TMaskImage MaskImageType;
62 
64  typedef typename InputImageType::Pointer InputImagePointer;
65  typedef typename InputImageType::ConstPointer InputImageConstPointer;
66  typedef typename MaskImageType::Pointer MaskImagePointer;
67  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
68 
69  typedef typename InputImageType::PixelType InputPixelType;
70  typedef typename MaskImageType::PixelType MaskPixelType;
71 
73  itkSetConstObjectMacro(Image, InputImageType);
74 
76  itkSetConstObjectMacro(Mask, MaskImageType);
77 
78  itkSetMacro(MaskValue, MaskPixelType);
79  itkGetConstMacro(MaskValue, MaskPixelType);
80 
81  itkSetMacro(SigmaFactor, double);
82  itkGetConstMacro(SigmaFactor, double);
83 
84  itkSetMacro(NumberOfIterations, unsigned int);
85  itkGetConstMacro(NumberOfIterations, unsigned int);
86 
92  void Compute(void);
93 
94  const InputPixelType & GetOutput() const;
95 
96 protected:
99  void PrintSelf(std::ostream & os, Indent indent) const;
100 
101 private:
102  KappaSigmaThresholdImageCalculator(const Self &); //purposely not implemented
103  void operator=(const Self &); //purposely not implemented
104 
105  bool m_Valid; // Have moments been computed yet?
108  unsigned int m_NumberOfIterations;
110 
113 }; // class KappaSigmaThresholdImageCalculator
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 #include "itkKappaSigmaThresholdImageCalculator.hxx"
118 #endif
119 
120 #endif /* __itkKappaSigmaThresholdImageCalculator_h */
121