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

itkImageToListSampleFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageToListSampleFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-02 05:43:56 $
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 #ifndef __itkImageToListSampleFilter_h
00018 #define __itkImageToListSampleFilter_h
00019 
00020 #include "itkListSample.h"
00021 #include "itkPixelTraits.h"
00022 #include "itkProcessObject.h"
00023 #include "itkDataObject.h"
00024 #include "itkDataObjectDecorator.h"
00025 #include "itkFixedArray.h"
00026 
00027 namespace itk { 
00028 namespace Statistics {
00029 
00053 template < class TImage, class TMaskImage = TImage > 
00054 class ITK_EXPORT ImageToListSampleFilter :
00055   public ProcessObject
00056 {
00057 public:
00059   typedef ImageToListSampleFilter     Self;
00060   typedef ProcessObject               Superclass;
00061   typedef SmartPointer< Self >        Pointer;
00062   typedef SmartPointer<const Self>    ConstPointer;
00063 
00065   itkTypeMacro(ImageToListSampleFilter, ProcessObject);
00066 
00068   itkNewMacro(Self);
00069 
00071   typedef TImage                           ImageType;
00072   typedef typename ImageType::Pointer      ImagePointer;
00073   typedef typename ImageType::ConstPointer ImageConstPointer;
00074   typedef typename ImageType::PixelType    PixelType;
00075   typedef typename MeasurementVectorPixelTraits< 
00076     PixelType >::MeasurementVectorType     MeasurementVectorType;
00077 
00079   typedef TMaskImage                           MaskImageType;
00080   typedef typename MaskImageType::Pointer      MaskImagePointer;
00081   typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
00082   typedef typename MaskImageType::PixelType    MaskPixelType;
00083 
00085   typedef ListSample< MeasurementVectorType >  ListSampleType;
00086 
00088   unsigned int GetMeasurementVectorSize() const;
00089 
00091   void SetInput( const ImageType* image );
00092   const ImageType* GetInput() const;
00094 
00096   void SetMaskImage( const MaskImageType* image );
00097   const MaskImageType* GetMaskImage() const;
00099 
00103   const ListSampleType * GetOutput() const;
00104 
00109   itkSetMacro( MaskValue, MaskPixelType );
00110   itkGetConstMacro( MaskValue, MaskPixelType );
00112 
00113 protected:
00114   ImageToListSampleFilter();
00115   virtual ~ImageToListSampleFilter() {}
00116   void PrintSelf(std::ostream& os, Indent indent) const;  
00117 
00119   typedef DataObject::Pointer DataObjectPointer;
00120   virtual DataObjectPointer MakeOutput(unsigned int idx);
00121 
00123   virtual void GenerateData();
00124 
00127   virtual void GenerateInputRequestedRegion()
00128     throw(InvalidRequestedRegionError);
00129 
00130   virtual void GenerateOutputInformation();
00131 
00132 private:
00133   ImageToListSampleFilter(const Self&); //purposely not implemented
00134   void operator=(const Self&); //purposely not implemented
00135 
00136   MaskPixelType m_MaskValue;
00137 
00138 }; // end of class ImageToListSampleFilter
00139 
00140 } // end of namespace Statistics
00141 } // end of namespace itk
00142 
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkImageToListSampleFilter.txx"
00145 #endif
00146 
00147 #endif
00148 

Generated at Mon Jul 12 2010 18:47:58 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000