00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _itkImageModelEstimatorBase_h
00018 #define _itkImageModelEstimatorBase_h
00019
00020 #include "itkLightProcessObject.h"
00021
00022 namespace itk
00023 {
00024
00063 template <class TInputImage,
00064 class TMembershipFunction>
00065 class ITK_EXPORT ImageModelEstimatorBase: public LightProcessObject
00066 {
00067 public:
00069 typedef ImageModelEstimatorBase Self;
00070 typedef LightProcessObject Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073
00075 itkTypeMacro(ImageModelEstimatorBase,LightProcessObject);
00076
00078 itkSetMacro(NumberOfModels, unsigned int);
00079
00081 itkGetConstReferenceMacro(NumberOfModels, unsigned int);
00082
00084 typedef typename TMembershipFunction::Pointer MembershipFunctionPointer ;
00085
00086 typedef std::vector< MembershipFunctionPointer >
00087 MembershipFunctionPointerVector;
00088
00090 typedef TInputImage InputImageType;
00091 typedef typename TInputImage::Pointer InputImagePointer;
00092
00094
00095
00097 itkSetObjectMacro(InputImage,InputImageType);
00098
00100 itkGetObjectMacro(InputImage,InputImageType);
00101
00103 void SetMembershipFunctions(MembershipFunctionPointerVector
00104 membershipFunctions)
00105 {
00106 m_MembershipFunctions = membershipFunctions;
00107 }
00108
00110 const MembershipFunctionPointerVector GetMembershipFunctions() const
00111 {
00112 return m_MembershipFunctions;
00113 }
00114
00116 unsigned int GetNumberOfMembershipFunctions()
00117 {
00118 return static_cast<unsigned int>( m_MembershipFunctions.size() );
00119 }
00120
00122 void DeleteAllMembershipFunctions()
00123 {
00124 m_MembershipFunctions.resize(0);
00125 }
00126
00128 unsigned int AddMembershipFunction(MembershipFunctionPointer function);
00129
00132 void Update() ;
00133
00134 protected:
00135 ImageModelEstimatorBase();
00136 ~ImageModelEstimatorBase();
00137 void PrintSelf(std::ostream& os, Indent indent) const;
00138
00139 virtual void GenerateData();
00140
00141 private:
00142
00143 ImageModelEstimatorBase(const Self&);
00144 void operator=(const Self&);
00145
00146 unsigned int m_NumberOfModels;
00147
00149 MembershipFunctionPointerVector m_MembershipFunctions;
00150
00152 InputImagePointer m_InputImage;
00153
00155 virtual void EstimateModels() = 0;
00156 };
00157
00158
00159 }
00160
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkImageModelEstimatorBase.txx"
00163 #endif
00164
00165
00166
00167 #endif
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184