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

itkPointSetToImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPointSetToImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/07/27 15:21:11 $
00007   Version:   $Revision: 1.3 $
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 __itkPointSetToImageFilter_h
00018 #define __itkPointSetToImageFilter_h
00019 
00020 #include "itkImageSource.h"
00021 #include "itkConceptChecking.h"
00022 
00023 namespace itk
00024 {
00025   
00032 template <class TInputPointSet, class TOutputImage>
00033 class ITK_EXPORT PointSetToImageFilter : public ImageSource<TOutputImage>
00034 {
00035 public:
00037   typedef PointSetToImageFilter                Self;
00038   typedef ImageSource<TOutputImage>            Superclass;
00039   typedef SmartPointer<Self>                   Pointer;
00040   typedef SmartPointer<const Self>             ConstPointer;
00041   typedef typename TOutputImage::SizeType      SizeType;
00042   typedef TOutputImage                         OutputImageType;
00043   typedef typename OutputImageType::Pointer    OutputImagePointer;
00044   typedef typename OutputImageType::ValueType  ValueType;
00045   
00047   itkNewMacro(Self);
00048   
00050   itkTypeMacro(PointSetToImageFilter,ImageSource);
00051 
00053   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00054 
00056   typedef TInputPointSet InputPointSetType;
00057   typedef typename InputPointSetType::Pointer        InputPointSetPointer;
00058   typedef typename InputPointSetType::ConstPointer   InputPointSetConstPointer;
00059 
00061   itkStaticConstMacro(InputPointSetDimension, unsigned int,
00062                       InputPointSetType::PointDimension);
00063   itkStaticConstMacro(OutputImageDimension, unsigned int,
00064                       TOutputImage::ImageDimension);
00065 
00067   typedef typename TOutputImage::SpacingType SpacingType;
00068   typedef typename TOutputImage::PointType   PointType;
00069 
00071   virtual void SetInput( const InputPointSetType *pointset);
00072   virtual void SetInput( unsigned int, const InputPointSetType * pointset);
00073   const InputPointSetType * GetInput(void);
00074   const InputPointSetType * GetInput(unsigned int idx);
00075 
00080   itkSetMacro(Spacing,SpacingType);
00081   virtual void SetSpacing( const double* spacing);
00082   virtual void SetSpacing( const float* spacing);
00083 
00088   itkGetConstReferenceMacro(Spacing,SpacingType);
00089 
00094   itkSetMacro(Origin,PointType);
00095   virtual void SetOrigin( const double* origin);
00096   virtual void SetOrigin( const float* origin);
00097  
00102   itkGetConstReferenceMacro(Origin,PointType);
00103 
00110   itkSetMacro(InsideValue, ValueType);
00111   itkGetMacro(InsideValue, ValueType);
00112 
00119   itkSetMacro(OutsideValue, ValueType);
00120   itkGetMacro(OutsideValue, ValueType);
00121 
00123   itkSetMacro(Size,SizeType);
00124   itkGetMacro(Size,SizeType);
00125 
00126 protected:
00127   PointSetToImageFilter();
00128   ~PointSetToImageFilter();
00129 
00130   virtual void GenerateOutputInformation(){}; // do nothing
00131   virtual void GenerateData();
00132 
00133   SizeType     m_Size;
00134   SpacingType  m_Spacing;
00135   PointType    m_Origin;
00136   ValueType    m_InsideValue;
00137   ValueType    m_OutsideValue;
00138 
00139   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00140 
00141 private:
00142   PointSetToImageFilter(const Self&); //purposely not implemented
00143   void operator=(const Self&); //purposely not implemented
00144 
00145 
00146 };
00147 
00148 } // end namespace itk
00149 
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkPointSetToImageFilter.txx"
00152 #endif
00153 
00154 #endif

Generated at Wed May 24 23:52:01 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000