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);
00066 
00068   typedef typename TOutputImage::SpacingType SpacingType;
00069   typedef typename TOutputImage::PointType   PointType;
00070 
00072   virtual void SetInput( const InputPointSetType *pointset);
00073   virtual void SetInput( unsigned int, const InputPointSetType * pointset);
00074   const InputPointSetType * GetInput(void);
00075   const InputPointSetType * GetInput(unsigned int idx);
00077 
00082   itkSetMacro(Spacing,SpacingType);
00083   virtual void SetSpacing( const double* spacing);
00084   virtual void SetSpacing( const float* spacing);
00086 
00091   itkGetConstReferenceMacro(Spacing,SpacingType);
00092 
00097   itkSetMacro(Origin,PointType);
00098   virtual void SetOrigin( const double* origin);
00099   virtual void SetOrigin( const float* origin);
00101 
00106   itkGetConstReferenceMacro(Origin,PointType);
00107 
00114   itkSetMacro(InsideValue, ValueType);
00115   itkGetMacro(InsideValue, ValueType);
00117 
00124   itkSetMacro(OutsideValue, ValueType);
00125   itkGetMacro(OutsideValue, ValueType);
00127 
00129   itkSetMacro(Size,SizeType);
00130   itkGetMacro(Size,SizeType);
00132 
00133 protected:
00134   PointSetToImageFilter();
00135   ~PointSetToImageFilter();
00136 
00137   virtual void GenerateOutputInformation(){}; // do nothing
00138   virtual void GenerateData();
00139 
00140   SizeType     m_Size;
00141   SpacingType  m_Spacing;
00142   PointType    m_Origin;
00143   ValueType    m_InsideValue;
00144   ValueType    m_OutsideValue;
00145 
00146   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00147 
00148 private:
00149   PointSetToImageFilter(const Self&); //purposely not implemented
00150   void operator=(const Self&); //purposely not implemented
00151 
00152 
00153 };
00154 
00155 } // end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkPointSetToImageFilter.txx"
00159 #endif
00160 
00161 #endif
00162 

Generated at Mon Mar 12 02:15:23 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000