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