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

itkSampleClassifierWithMask.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSampleClassifierWithMask.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/12/09 16:53:08 $
00007   Version:   $Revision: 1.4 $
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 __itkSampleClassifierWithMask_h
00018 #define __itkSampleClassifierWithMask_h
00019 
00020 #include <vector>
00021 
00022 #include "itkObject.h"
00023 #include "itkExceptionObject.h"
00024 #include "itkSubsample.h"
00025 #include "itkMembershipSample.h"
00026 #include "itkSampleClassifier.h"
00027 
00028 namespace itk{ 
00029   namespace Statistics{
00030 
00053 template< class TSample, class TMaskSample >
00054 class ITK_EXPORT SampleClassifierWithMask : 
00055       public SampleClassifier< TSample >
00056 {
00057 public:
00059   typedef SampleClassifierWithMask Self;
00060   typedef SampleClassifier< TSample > Superclass;
00061   typedef SmartPointer< Self > Pointer;
00062   typedef SmartPointer<const Self> ConstPointer;
00063 
00065   itkTypeMacro(SampleClassifierWithMask, SampleClassifier);
00066   itkNewMacro(Self) ;
00067 
00069   typedef typename Superclass::OutputType OutputType ;
00070   typedef typename Superclass::ClassLabelType ClassLabelType ;
00071   typedef typename Superclass::ClassLabelVectorType ClassLabelVectorType ;
00072 
00074   typedef typename TSample::MeasurementType MeasurementType ;
00075   typedef typename TSample::MeasurementVectorType MeasurementVectorType ;
00076 
00077   itkStaticConstMacro(MeasurementVectorSize, unsigned int,
00078                       TSample::MeasurementVectorSize);
00079 
00081   typedef typename Superclass::MembershipFunctionPointerVector 
00082     MembershipFunctionPointerVector ;
00083 
00084   void SetMask( TMaskSample* mask ) ;
00085 
00086   TMaskSample* GetMask()
00087   { return m_Mask.GetPointer() ; }
00088 
00089   void SetSelectedClassLabels( ClassLabelVectorType& labels)
00090   { m_SelectedClassLabels = labels ; }
00091 
00092   void SetOtherClassLabel( ClassLabelType label) 
00093   { m_OtherClassLabel = label ; }
00094  
00095 protected:
00096   SampleClassifierWithMask() ;
00097   virtual ~SampleClassifierWithMask() {}
00098   void PrintSelf(std::ostream& os, Indent indent) const;
00099 
00101   void GenerateData() ;
00102 
00103 private:
00105   typename TMaskSample::Pointer m_Mask ;
00106   ClassLabelVectorType m_SelectedClassLabels ;
00107   ClassLabelType m_OtherClassLabel ;
00108 } ; // end of class
00109 
00110 
00111   } // end of namespace Statistics 
00112 } // end of namespace itk
00113 
00114 
00115 #ifndef ITK_MANUAL_INSTANTIATION
00116 #include "itkSampleClassifierWithMask.txx"
00117 #endif
00118 
00119 #endif
00120 
00121 
00122 
00123 
00124 
00125 
00126 

Generated at Wed Mar 30 00:09:16 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000