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

itkScalarImageTextureCalculator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalarImageTextureCalculator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/24 15:16:53 $
00007   Version:   $Revision: 1.6 $
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 __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 
00106 template< class TImageType,
00107           class THistogramFrequencyContainer = DenseFrequencyContainer >
00108 class ScalarImageTextureCalculator : public Object
00109 {
00110 public:
00112   typedef ScalarImageTextureCalculator Self;
00113   typedef Object Superclass;
00114   typedef SmartPointer<Self> Pointer;
00115   typedef SmartPointer<const Self> ConstPointer;
00116 
00118   itkTypeMacro(ScalarImageTextureCalculator, Object);
00119 
00121   itkNewMacro(Self) ;
00122 
00123   typedef THistogramFrequencyContainer                FrequencyContainerType;
00124   typedef TImageType                                  ImageType;
00125   typedef typename ImageType::Pointer                 ImagePointer;
00126       
00127   typedef typename ImageType::PixelType               PixelType;
00128   typedef typename ImageType::OffsetType              OffsetType;
00129   typedef VectorContainer<unsigned char, OffsetType>  OffsetVector;
00130   typedef typename OffsetVector::Pointer              OffsetVectorPointer;
00131   typedef typename OffsetVector::ConstPointer         OffsetVectorConstPointer;
00132 
00133   typedef MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator< ImageType,
00134     FrequencyContainerType > GLCMGeneratorType;
00135   typedef GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator< typename
00136   GLCMGeneratorType::HistogramType >                GLCMCalculatorType;
00137       
00138   typedef VectorContainer<unsigned char, TextureFeatureName> FeatureNameVector;
00139   typedef typename FeatureNameVector::Pointer         FeatureNameVectorPointer;
00140   typedef typename FeatureNameVector::ConstPointer    FeatureNameVectorConstPointer;
00141   typedef VectorContainer<unsigned char, double>      FeatureValueVector;
00142   typedef typename FeatureValueVector::Pointer        FeatureValueVectorPointer;
00143      
00145   void Compute( void );
00146 
00148   void SetInput( const ImageType * );
00149 
00153   itkGetObjectMacro(FeatureMeans, FeatureValueVector);
00154   itkGetObjectMacro(FeatureStandardDeviations, FeatureValueVector);
00156 
00158   itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
00159   itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
00161 
00164   itkSetConstObjectMacro(Offsets, OffsetVector);
00165   itkGetConstObjectMacro(Offsets, OffsetVector);
00167 
00170   void SetNumberOfBinsPerAxis( unsigned int );
00171 
00174   void SetPixelValueMinMax( PixelType min, PixelType max );
00176 
00179   void SetImageMask(const ImageType * );
00180 
00183   void SetInsidePixelValue(PixelType InsidePixelValue);
00184 
00185   itkGetMacro(FastCalculations, bool);
00186   itkSetMacro(FastCalculations, bool);
00187   itkBooleanMacro(FastCalculations);
00188       
00189 protected:
00190   ScalarImageTextureCalculator();
00191   virtual ~ScalarImageTextureCalculator() {};
00192   void PrintSelf(std::ostream& os, Indent indent) const;
00193   void FastCompute();
00194   void FullCompute();
00195       
00196 private:
00197   typename GLCMGeneratorType::Pointer m_GLCMGenerator;
00198   FeatureValueVectorPointer m_FeatureMeans, m_FeatureStandardDeviations;
00199   FeatureNameVectorConstPointer m_RequestedFeatures;
00200   OffsetVectorConstPointer m_Offsets;
00201   bool m_FastCalculations;
00202 };    
00203     
00204 } // end of namespace Statistics 
00205 } // end of namespace itk 
00206 
00207 #ifndef ITK_MANUAL_INSTANTIATION
00208 #include "itkScalarImageTextureCalculator.txx"
00209 #endif
00210 
00211 #endif
00212 

Generated at Thu Nov 6 00:01:54 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000