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

itkSampleToHistogramFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSampleToHistogramFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-02 05:43:58 $
00007   Version:   $Revision: 1.1 $
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 __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   // Where the histogram is actually computed
00135   virtual void GenerateData();
00136   
00137 private:
00138   SampleToHistogramFilter(const Self&); //purposely not implemented
00139   void operator=(const Self&); //purposely not implemented
00140 
00141 }; // end of class
00142 
00143 } // end of namespace Statistics 
00144 } // end of namespace itk
00145 
00146 
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkSampleToHistogramFilter.txx"
00149 #endif
00150   
00151 #endif
00152 

Generated at Tue Sep 15 04:42:31 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000