00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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(){};
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&);
00143 void operator=(const Self&);
00144
00145
00146 };
00147
00148 }
00149
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkPointSetToImageFilter.txx"
00152 #endif
00153
00154 #endif