00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkScalarImageTextureCalculator_h
00018 #define __itkScalarImageTextureCalculator_h
00019
00020 #include "itkImage.h"
00021 #include "itkObject.h"
00022 #include "itkVectorContainer.h"
00023 #include "itkMacro.h"
00024
00025 #include "itkGreyLevelCooccurrenceMatrixTextureCoefficientsCalculator.h"
00026 #include "itkMaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator.h"
00027
00028 namespace itk {
00029 namespace Statistics {
00030
00092 template< class TImageType >
00093 class ScalarImageTextureCalculator : public Object
00094 {
00095 public:
00097 typedef ScalarImageTextureCalculator Self;
00098 typedef Object Superclass;
00099 typedef SmartPointer<Self> Pointer;
00100 typedef SmartPointer<const Self> ConstPointer;
00101
00103 itkTypeMacro(ScalarImageTextureCalculator, Object);
00104
00106 itkNewMacro(Self) ;
00107
00108 typedef TImageType ImageType;
00109 typedef typename ImageType::Pointer ImagePointer;
00110
00111 typedef typename ImageType::PixelType PixelType;
00112 typedef typename ImageType::OffsetType OffsetType;
00113 typedef VectorContainer<unsigned char, OffsetType> OffsetVector;
00114 typedef typename OffsetVector::Pointer OffsetVectorPointer;
00115
00116 typedef MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator< ImageType >
00117 GLCMGeneratorType;
00118 typedef GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator< typename
00119 GLCMGeneratorType::HistogramType > GLCMCalculatorType;
00120
00121 typedef VectorContainer<unsigned char, TextureFeatureName> FeatureNameVector;
00122 typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer;
00123 typedef VectorContainer<unsigned char, double> FeatureValueVector;
00124 typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer;
00125
00126
00127
00129 void Compute( void );
00130
00132 void SetInput( const ImagePointer );
00133
00137 itkGetMacro(FeatureMeans, FeatureValueVectorPointer);
00138 itkGetMacro(FeatureStandardDeviations, FeatureValueVectorPointer);
00139
00141 itkSetMacro(RequestedFeatures, FeatureNameVectorPointer);
00142
00145 itkSetMacro(Offsets, OffsetVectorPointer);
00146
00149 void SetNumberOfBinsPerAxis( unsigned int numberOfBins );
00150
00153 void SetPixelValueMinMax( PixelType min, PixelType max );
00154
00157 void SetImageMask(ImagePointer ImageMask);
00158
00161 void SetInsidePixelValue(PixelType InsidePixelValue);
00162
00163
00164 protected:
00165 ScalarImageTextureCalculator();
00166 virtual ~ScalarImageTextureCalculator() {};
00167 void PrintSelf(std::ostream& os, Indent indent) const;
00168
00169 private:
00170 typename GLCMGeneratorType::Pointer m_GLCMGenerator;
00171 FeatureValueVectorPointer m_FeatureMeans, m_FeatureStandardDeviations;
00172 FeatureNameVectorPointer m_RequestedFeatures;
00173 OffsetVectorPointer m_Offsets;
00174 };
00175
00176 }
00177 }
00178
00179 #ifndef ITK_MANUAL_INSTANTIATION
00180 #include "itkScalarImageTextureCalculator.txx"
00181 #endif
00182
00183 #endif