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

itkScalarImageToCooccurrenceListSampleFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalarImageToCooccurrenceListSampleFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-02 05:43:58 $
00007   Version:   $Revision: 1.1 $
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 
00018 #ifndef __itkScalarImageToCooccurrenceListSampleFilter_h
00019 #define __itkScalarImageToCooccurrenceListSampleFilter_h
00020 
00021 #include <typeinfo>
00022 
00023 #include "itkImage.h"
00024 #include "itkPixelTraits.h"
00025 #include "itkImageToListSampleFilter.h"
00026 #include "itkSmartPointer.h"
00027 #include "itkImageRegionIterator.h"
00028 #include "itkShapedNeighborhoodIterator.h"
00029 #include "itkNeighborhoodIterator.h"
00030 #include "itkNeighborhoodAlgorithm.h"
00031 #include "itkConstantBoundaryCondition.h"
00032 #include "itkListSample.h"
00033 #include "itkFixedArray.h"
00034 #include "itkMacro.h"
00035 #include "itkProcessObject.h"
00036 
00037 #include <vector>
00038 #include <algorithm>
00039 #include <iostream>
00040 
00041 namespace itk { 
00042 namespace Statistics {
00043 
00054 template < class TImage >
00055 class ITK_EXPORT ScalarImageToCooccurrenceListSampleFilter
00056   : public ProcessObject
00057 {
00058 public:
00059   typedef TImage ImageType;
00060 
00061   typedef FixedArray< typename TImage::PixelType, 2 > MeasurementVectorType;
00062 
00063   typedef itk::Statistics::ListSample< MeasurementVectorType > SampleType;
00064   typedef typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType;
00065 
00067   typedef ScalarImageToCooccurrenceListSampleFilter Self;
00068   typedef ProcessObject                             Superclass;
00069   typedef SmartPointer< Self >                      Pointer;
00070   typedef SmartPointer<const Self>                  ConstPointer;
00071 
00073   typedef itk::ShapedNeighborhoodIterator< 
00074                   TImage , 
00075                   ConstantBoundaryCondition<TImage> 
00076                                        > ShapedNeighborhoodIteratorType;
00077 
00079   typedef typename ShapedNeighborhoodIteratorType::OffsetType OffsetType;
00080   typedef std::vector<OffsetType>                             OffsetTable;
00081 
00082   void UseNeighbor(const OffsetType & offset);
00083 
00085   void SetInput( const ImageType* image );
00086   const ImageType* GetInput() const;
00088 
00090   const SampleType * GetOutput() const;
00091 
00093   itkTypeMacro(ScalarImageToCooccurrenceListSampleFilter, ProcessObject);
00094 
00096   itkNewMacro(Self);
00097 
00099   itkStaticConstMacro(MeasurementVectorSize, unsigned int, 2);
00100 
00102   itkStaticConstMacro(ImageDimension, unsigned int,
00103                       TImage::ImageDimension);
00104 
00105 
00106 protected:
00107   ScalarImageToCooccurrenceListSampleFilter();
00108   virtual ~ScalarImageToCooccurrenceListSampleFilter() {}
00109   void PrintSelf(std::ostream& os, Indent indent) const;  
00110 
00111   typedef DataObject::Pointer DataObjectPointer;
00112   virtual DataObjectPointer MakeOutput(unsigned int idx);
00113 
00115   virtual void GenerateData();
00116 
00117 
00118 private:
00119   ScalarImageToCooccurrenceListSampleFilter(const Self&); //purposely not implemented
00120   void operator=(const Self&); //purposely not implemented
00121 
00122   OffsetTable                  m_OffsetTable;
00123 }; // end of class ScalarImageToListSampleFilter
00124 
00125 } // end of namespace Statistics
00126 } // end of namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkScalarImageToCooccurrenceListSampleFilter.txx"
00130 #endif
00131 
00132 #endif
00133 

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