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: 2009-03-04 19:29:54 $
00007   Version:   $Revision: 1.7 $
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;
00199   FeatureValueVectorPointer           m_FeatureStandardDeviations;
00200   FeatureNameVectorConstPointer       m_RequestedFeatures;
00201   OffsetVectorConstPointer            m_Offsets;
00202   bool                                m_FastCalculations;
00203 };
00204     
00205 } // end of namespace Statistics 
00206 } // end of namespace itk 
00207 
00208 #ifndef ITK_MANUAL_INSTANTIATION
00209 #include "itkScalarImageTextureCalculator.txx"
00210 #endif
00211 
00212 #endif
00213 

Generated at Mon Jul 12 2010 19:45:14 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000