itkSampleToHistogramFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSampleToHistogramFilter_h
00018 #define __itkSampleToHistogramFilter_h
00019
00020 #include "itkMacro.h"
00021 #include "itkProcessObject.h"
00022 #include "itkMeasurementVectorTraits.h"
00023 #include "itkSimpleDataObjectDecorator.h"
00024
00025
00026 namespace itk {
00027 namespace Statistics {
00028
00039 template < class TSample, class THistogram >
00040 class ITK_EXPORT SampleToHistogramFilter : public ProcessObject
00041 {
00042 public:
00044 typedef SampleToHistogramFilter Self;
00045 typedef ProcessObject Superclass;
00046 typedef SmartPointer< Self > Pointer;
00047 typedef SmartPointer<const Self > ConstPointer;
00048
00050 itkTypeMacro(SampleToHistogramFilter, ProcessObject);
00051
00053 itkNewMacro(Self);
00054
00056 typedef TSample SampleType;
00057 typedef THistogram HistogramType;
00058 typedef typename SampleType::MeasurementVectorType MeasurementVectorType;
00059 typedef typename MeasurementVectorType::ValueType MeasurementType;
00060 typedef typename HistogramType::SizeType HistogramSizeType;
00061 typedef typename HistogramType::MeasurementType HistogramMeasurementType;
00062 typedef typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType;
00063
00064
00066 itkSuperclassTraitMacro( DataObjectPointer )
00067
00068
00069 virtual void SetInput( const SampleType * sample );
00070 virtual const SampleType * GetInput() const;
00072
00074 const HistogramType * GetOutput() const;
00075
00077 typedef SimpleDataObjectDecorator<
00078 HistogramSizeType > InputHistogramSizeObjectType;
00079
00081 typedef SimpleDataObjectDecorator<
00082 HistogramMeasurementType > InputHistogramMeasurementObjectType;
00083
00086 typedef SimpleDataObjectDecorator<
00087 HistogramMeasurementVectorType > InputHistogramMeasurementVectorObjectType;
00088
00090 typedef SimpleDataObjectDecorator< bool > InputBooleanObjectType;
00091
00098 itkSetDecoratedInputMacro( HistogramSize, HistogramSizeType, 1 );
00099
00103 itkSetDecoratedInputMacro( MarginalScale, HistogramMeasurementType, 2 );
00104
00107 itkSetDecoratedInputMacro( HistogramBinMinimum, HistogramMeasurementVectorType, 3 );
00108 itkSetDecoratedInputMacro( HistogramBinMaximum, HistogramMeasurementVectorType, 4 );
00110
00114 itkSetDecoratedInputMacro( AutoMinimumMaximum, bool, 5 );
00115
00118 virtual void GraftOutput(DataObject *output);
00119
00120 protected:
00121 SampleToHistogramFilter();
00122 virtual ~SampleToHistogramFilter();
00123
00124 void PrintSelf(std::ostream& os, Indent indent) const;
00125
00132 virtual DataObjectPointer MakeOutput(unsigned int idx);
00133
00134
00135 virtual void GenerateData();
00136
00137 private:
00138 SampleToHistogramFilter(const Self&);
00139 void operator=(const Self&);
00140
00141 };
00142
00143 }
00144 }
00145
00146
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkSampleToHistogramFilter.txx"
00149 #endif
00150
00151 #endif
00152