Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkMembershipSampleGenerator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMembershipSampleGenerator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-04 15:24:02 $
00007   Version:   $Revision: 1.12 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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);
00065 
00067   typedef typename TInputSample::MeasurementVectorType MeasurementVectorType;
00068 
00070   typedef MembershipSample< TInputSample > OutputType;
00071   typedef typename OutputType::Pointer     OutputPointer;
00072 
00074   void SetInput(const TInputSample* sample);
00075 
00077   const TInputSample* GetInput() const;
00078 
00080   void SetClassMask(const TClassMaskSample* classMask);
00081 
00083   const TClassMaskSample* GetClassMask() const;
00084 
00085   void SetNumberOfClasses(int numberOfClasses);
00086 
00087   int GetNumberOfClasses();
00088 
00091   const OutputType * GetOutput() const;
00092 
00094   void GenerateData();
00095 
00096 protected:
00097   MembershipSampleGenerator();
00098   virtual ~MembershipSampleGenerator() {}
00099   void PrintSelf(std::ostream& os, Indent indent) const;
00100 
00101 private:
00102   typename TInputSample::ConstPointer     m_Input;
00103   typename TClassMaskSample::ConstPointer m_ClassMask;
00104   int                                     m_NumberOfClasses;
00105   OutputPointer                           m_Output;
00106 }; // end of class
00107 
00108 } // end namespace Statistics
00109 } // end namespace itk
00110 
00111 #ifndef ITK_MANUAL_INSTANTIATION
00112 #include "itkMembershipSampleGenerator.txx"
00113 #endif
00114 
00115 #endif
00116 

Generated at Tue Sep 15 03:57:20 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000