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::DirectionType DirectionType;
00070 typedef typename TOutputImage::PointType PointType;
00071
00073 virtual void SetInput( const InputPointSetType *pointset);
00074 virtual void SetInput( unsigned int, const InputPointSetType * pointset);
00075 const InputPointSetType * GetInput(void);
00076 const InputPointSetType * GetInput(unsigned int idx);
00078
00083 itkSetMacro(Spacing,SpacingType);
00084 virtual void SetSpacing( const double* spacing);
00085 virtual void SetSpacing( const float* spacing);
00087
00092 itkGetConstReferenceMacro(Spacing,SpacingType);
00093
00097 itkSetMacro(Direction,DirectionType);
00098 itkGetConstReferenceMacro(Direction,DirectionType);
00100
00105 itkSetMacro(Origin,PointType);
00106 virtual void SetOrigin( const double* origin);
00107 virtual void SetOrigin( const float* origin);
00109
00114 itkGetConstReferenceMacro(Origin,PointType);
00115
00122 itkSetMacro(InsideValue, ValueType);
00123 itkGetConstMacro(InsideValue, ValueType);
00125
00132 itkSetMacro(OutsideValue, ValueType);
00133 itkGetConstMacro(OutsideValue, ValueType);
00135
00137 itkSetMacro(Size,SizeType);
00138 itkGetConstMacro(Size,SizeType);
00140
00141 protected:
00142 PointSetToImageFilter();
00143 ~PointSetToImageFilter();
00144
00145 virtual void GenerateOutputInformation(){};
00146 virtual void GenerateData();
00147
00148 SizeType m_Size;
00149 PointType m_Origin;
00150 SpacingType m_Spacing;
00151 DirectionType m_Direction;
00152 ValueType m_InsideValue;
00153 ValueType m_OutsideValue;
00154
00155 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00156
00157 private:
00158 PointSetToImageFilter(const Self&);
00159 void operator=(const Self&);
00160
00161
00162 };
00163
00164 }
00165
00166 #ifndef ITK_MANUAL_INSTANTIATION
00167 #include "itkPointSetToImageFilter.txx"
00168 #endif
00169
00170 #endif
00171