00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator_h
00018 #define __itkMaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator_h
00019
00020 #include "itkScalarImageToGreyLevelCooccurrenceMatrixGenerator.h"
00021 #include "itkMacro.h"
00022
00023 namespace itk {
00024 namespace Statistics {
00025
00048 template< class TImageType,
00049 class THistogramFrequencyContainer = DenseFrequencyContainer >
00050 class MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator :
00051 public ScalarImageToGreyLevelCooccurrenceMatrixGenerator< TImageType,
00052 THistogramFrequencyContainer >
00053 {
00054 public:
00056 typedef MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator Self;
00057 typedef ScalarImageToGreyLevelCooccurrenceMatrixGenerator< TImageType,
00058 THistogramFrequencyContainer > Superclass;
00059 typedef SmartPointer<Self> Pointer;
00060 typedef SmartPointer<const Self> ConstPointer;
00061
00063 itkTypeMacro(MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator, Object);
00064
00066 itkNewMacro(Self) ;
00067
00068 typedef TImageType ImageType;
00069 typedef typename ImageType::Pointer ImagePointer;
00070 typedef typename ImageType::ConstPointer ImageConstPointer;
00071 typedef typename ImageType::PixelType PixelType;
00072 typedef typename ImageType::RegionType RegionType;
00073 typedef typename ImageType::SizeType RadiusType;
00074 typedef typename ImageType::OffsetType OffsetType;
00075 typedef VectorContainer<unsigned char, OffsetType> OffsetVector;
00076 typedef typename OffsetVector::Pointer OffsetVectorPointer;
00077 typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer;
00078
00079 typedef typename NumericTraits<PixelType>::RealType MeasurementType;
00080
00081 typedef Histogram< MeasurementType, 2, THistogramFrequencyContainer >
00082 HistogramType;
00083 typedef typename HistogramType::Pointer HistogramPointer;
00084 typedef typename HistogramType::ConstPointer HistogramConstPointer;
00085 typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
00086
00087
00088
00090 itkSetConstObjectMacro( ImageMask, ImageType );
00091 itkGetConstObjectMacro( ImageMask, ImageType );
00093
00096 itkSetMacro( InsidePixelValue, PixelType );
00097 itkGetMacro( InsidePixelValue, PixelType );
00099
00100 protected:
00101 MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator();
00102 virtual ~MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator() {};
00103 void PrintSelf(std::ostream& os, Indent indent) const;
00104 void FillHistogram( RadiusType radius, RegionType region );
00105
00106 private:
00107 ImageConstPointer m_ImageMask;
00108 PixelType m_InsidePixelValue;
00109
00110 };
00111
00112
00113 }
00114 }
00115
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkMaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator.txx"
00118 #endif
00119
00120 #endif
00121