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

itkPathToImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPathToImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-17 16:30:49 $
00007   Version:   $Revision: 1.4 $
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 __itkPathToImageFilter_h
00018 #define __itkPathToImageFilter_h
00019 
00020 #include "itkImageSource.h"
00021 #include "itkConceptChecking.h"
00022 
00023 namespace itk
00024 {
00025   
00034 template <class TInputPath, class TOutputImage>
00035 class ITK_EXPORT PathToImageFilter : public ImageSource<TOutputImage>
00036 {
00037 public:
00039   typedef PathToImageFilter          Self;
00040   typedef ImageSource<TOutputImage>  Superclass;
00041   typedef SmartPointer<Self>         Pointer;
00042   typedef SmartPointer<const Self>   ConstPointer;
00043 
00045   itkNewMacro(Self);
00046 
00048   itkTypeMacro(PathToImageFilter,ImageSource);
00049 
00051   typedef typename Superclass::OutputImageRegionType  OutputImageRegionType;
00052   typedef          TInputPath                         InputPathType;
00053   typedef typename InputPathType::Pointer             InputPathPointer;
00054   typedef typename InputPathType::ConstPointer        InputPathConstPointer;
00055   typedef          TOutputImage                       OutputImageType;
00056   typedef typename OutputImageType::Pointer           OutputImagePointer;
00057   typedef typename OutputImageType::SizeType          SizeType;
00058   typedef typename OutputImageType::ValueType         ValueType;
00059 
00061   itkStaticConstMacro(OutputImageDimension, unsigned int,
00062                       TOutputImage::ImageDimension);
00063 
00065   virtual void SetInput( const InputPathType *path);
00066   virtual void SetInput( unsigned int, const TInputPath * path);
00067   const InputPathType * GetInput(void);
00068   const InputPathType * GetInput(unsigned int idx);
00070 
00075   virtual void SetSpacing( const double* spacing);
00076   virtual void SetSpacing( const float* spacing);
00077   virtual const double* GetSpacing() const;
00079 
00082   itkSetMacro(PathValue, ValueType);
00083   itkGetMacro(PathValue, ValueType);
00084   itkSetMacro(BackgroundValue, ValueType);
00085   itkGetMacro(BackgroundValue, ValueType);
00087 
00092   virtual void SetOrigin( const double* origin);
00093   virtual void SetOrigin( const float* origin);
00094   virtual const double * GetOrigin() const;
00096 
00098   itkSetMacro(Size,SizeType);
00099   itkGetMacro(Size,SizeType);
00101 
00102 protected:
00103   PathToImageFilter();
00104   ~PathToImageFilter();
00105 
00106   virtual void GenerateOutputInformation(){}; // do nothing
00107   virtual void GenerateData();
00108 
00109 
00110   SizeType     m_Size;
00111   double       m_Spacing[OutputImageDimension];
00112   double       m_Origin[OutputImageDimension];
00113   ValueType    m_PathValue;
00114   ValueType    m_BackgroundValue;
00115 
00116   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00117 
00118 private:
00119   PathToImageFilter(const Self&); //purposely not implemented
00120   void operator=(const Self&); //purposely not implemented
00121 
00122 };
00123 
00124 } // end namespace itk
00125 
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkPathToImageFilter.txx"
00128 #endif
00129 
00130 #endif
00131 

Generated at Wed Nov 5 23:27:27 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000