ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkKappaSigmaThresholdImageCalculator_h 00019 #define __itkKappaSigmaThresholdImageCalculator_h 00020 00021 #include "itkMacro.h" 00022 #include "itkImage.h" 00023 00024 namespace itk 00025 { 00039 template< class TInputImage, class TMaskImage > 00040 class ITK_EXPORT KappaSigmaThresholdImageCalculator:public Object 00041 { 00042 public: 00044 typedef KappaSigmaThresholdImageCalculator Self; 00045 typedef Object Superclass; 00046 typedef SmartPointer< Self > Pointer; 00047 typedef SmartPointer< const Self > ConstPointer; 00048 00050 itkNewMacro(Self); 00051 00053 itkTypeMacro(KappaSigmaThresholdImageCalculator, Object); 00054 00056 itkStaticConstMacro(ImageDimension, unsigned int, 00057 TInputImage::ImageDimension); 00058 00060 typedef TInputImage InputImageType; 00061 typedef TMaskImage MaskImageType; 00062 00064 typedef typename InputImageType::Pointer InputImagePointer; 00065 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00066 typedef typename MaskImageType::Pointer MaskImagePointer; 00067 typedef typename MaskImageType::ConstPointer MaskImageConstPointer; 00068 00069 typedef typename InputImageType::PixelType InputPixelType; 00070 typedef typename MaskImageType::PixelType MaskPixelType; 00071 00073 itkSetConstObjectMacro(Image, InputImageType); 00074 00076 itkSetConstObjectMacro(Mask, MaskImageType); 00077 00078 itkSetMacro(MaskValue, MaskPixelType); 00079 itkGetConstMacro(MaskValue, MaskPixelType); 00080 00081 itkSetMacro(SigmaFactor, double); 00082 itkGetConstMacro(SigmaFactor, double); 00083 00084 itkSetMacro(NumberOfIterations, unsigned int); 00085 itkGetConstMacro(NumberOfIterations, unsigned int); 00086 00092 void Compute(void); 00093 00094 const InputPixelType & GetOutput() const; 00095 00096 protected: 00097 KappaSigmaThresholdImageCalculator(); 00098 virtual ~KappaSigmaThresholdImageCalculator() {} 00099 void PrintSelf(std::ostream & os, Indent indent) const; 00100 00101 private: 00102 KappaSigmaThresholdImageCalculator(const Self &); //purposely not implemented 00103 void operator=(const Self &); //purposely not implemented 00104 00105 bool m_Valid; // Have moments been computed yet? 00106 MaskPixelType m_MaskValue; 00107 double m_SigmaFactor; 00108 unsigned int m_NumberOfIterations; 00109 InputPixelType m_Output; 00110 00111 InputImageConstPointer m_Image; 00112 MaskImageConstPointer m_Mask; 00113 }; // class KappaSigmaThresholdImageCalculator 00114 } // end namespace itk 00115 00116 #ifndef ITK_MANUAL_INSTANTIATION 00117 #include "itkKappaSigmaThresholdImageCalculator.hxx" 00118 #endif 00119 00120 #endif /* __itkKappaSigmaThresholdImageCalculator_h */ 00121