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 );
00092
00095 itkSetMacro( InsidePixelValue, PixelType );
00096 itkGetMacro( InsidePixelValue, PixelType );
00097
00098 protected:
00099 MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator();
00100 virtual ~MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator() {};
00101 void PrintSelf(std::ostream& os, Indent indent) const;
00102 void FillHistogram( RadiusType radius, RegionType region );
00103
00104 private:
00105 ImageConstPointer m_ImageMask;
00106 PixelType m_InsidePixelValue;
00107
00108 };
00109
00110
00111 }
00112 }
00113
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkMaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator.txx"
00116 #endif
00117
00118 #endif