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: 2005-07-26 15:55:04 $
00007   Version:   $Revision: 1.5 $
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 
00059 template< class TSample, class TMaskSample >
00060 class ITK_EXPORT SampleClassifierWithMask : 
00061       public SampleClassifier< TSample >
00062 {
00063 public:
00065   typedef SampleClassifierWithMask Self;
00066   typedef SampleClassifier< TSample > Superclass;
00067   typedef SmartPointer< Self > Pointer;
00068   typedef SmartPointer<const Self> ConstPointer;
00069 
00071   itkTypeMacro(SampleClassifierWithMask, SampleClassifier);
00072   itkNewMacro(Self) ;
00074 
00076   typedef typename Superclass::OutputType OutputType ;
00077   typedef typename Superclass::ClassLabelType ClassLabelType ;
00078   typedef typename Superclass::ClassLabelVectorType ClassLabelVectorType ;
00079 
00081   typedef typename TSample::MeasurementType MeasurementType ;
00082   typedef typename TSample::MeasurementVectorType MeasurementVectorType ;
00083 
00084   
00086   typedef typename Superclass::MembershipFunctionPointerVector 
00087     MembershipFunctionPointerVector ;
00088 
00089   void SetMask( TMaskSample* mask ) ;
00090 
00091   TMaskSample* GetMask()
00092   { return m_Mask.GetPointer() ; }
00093 
00094   void SetSelectedClassLabels( ClassLabelVectorType& labels)
00095   { m_SelectedClassLabels = labels ; }
00096 
00097   void SetOtherClassLabel( ClassLabelType label) 
00098   { m_OtherClassLabel = label ; }
00099  
00100 protected:
00101   SampleClassifierWithMask() ;
00102   virtual ~SampleClassifierWithMask() {}
00103   void PrintSelf(std::ostream& os, Indent indent) const;
00104 
00106   void GenerateData() ;
00107 
00108 private:
00110   typename TMaskSample::Pointer m_Mask ;
00111   ClassLabelVectorType m_SelectedClassLabels ;
00112   ClassLabelType m_OtherClassLabel ;
00113 } ; // end of class
00114 
00115 
00116   } // end of namespace Statistics 
00117 } // end of namespace itk
00118 
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkSampleClassifierWithMask.txx"
00122 #endif
00123 
00124 #endif
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 

Generated at Mon Apr 14 14:17:19 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000