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);
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(){};
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&);
00150 void operator=(const Self&);
00151
00152
00153 };
00154
00155 }
00156
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkPointSetToImageFilter.txx"
00159 #endif
00160
00161 #endif
00162