00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMembershipSampleGenerator_h
00018 #define __itkMembershipSampleGenerator_h
00019
00020
00021 #include "itkObject.h"
00022 #include "itkMembershipSample.h"
00023
00024 namespace itk{
00025 namespace Statistics{
00026
00050 template< class TInputSample, class TClassMaskSample >
00051 class ITK_EXPORT MembershipSampleGenerator :
00052 public Object
00053 {
00054 public:
00056 typedef MembershipSampleGenerator Self;
00057 typedef Object Superclass ;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00062 itkTypeMacro(MembershipSampleGenerator, Object);
00063 itkNewMacro(Self) ;
00064
00066 typedef typename TInputSample::MeasurementVectorType MeasurementVectorType ;
00067
00069 typedef MembershipSample< TInputSample > OutputType ;
00070 typedef typename OutputType::Pointer OutputPointer ;
00071
00073 void SetInput(const TInputSample* sample) ;
00074
00076 const TInputSample* GetInput() const;
00077
00079 void SetClassMask(const TClassMaskSample* classMask) ;
00080
00082 const TClassMaskSample* GetClassMask() const;
00083
00084 void SetNumberOfClasses(int numberOfClasses) ;
00085
00086 int GetNumberOfClasses() ;
00087
00090 const OutputType * GetOutput() const;
00091
00093 void GenerateData() ;
00094
00095 protected:
00096 MembershipSampleGenerator() ;
00097 virtual ~MembershipSampleGenerator() {}
00098 void PrintSelf(std::ostream& os, Indent indent) const;
00099
00100 private:
00101 typename TInputSample::ConstPointer m_Input ;
00102 typename TClassMaskSample::ConstPointer m_ClassMask ;
00103 int m_NumberOfClasses ;
00104 OutputPointer m_Output ;
00105 } ;
00106
00107 }
00108 }
00109
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkMembershipSampleGenerator.txx"
00112 #endif
00113
00114 #endif