00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSpatialObjectToImageFilter_h
00018 #define __itkSpatialObjectToImageFilter_h
00019
00020 #include "itkImageSource.h"
00021 #include "itkConceptChecking.h"
00022
00023 namespace itk
00024 {
00025
00034 template <class TInputSpatialObject, class TOutputImage>
00035 class ITK_EXPORT SpatialObjectToImageFilter : public ImageSource<TOutputImage>
00036 {
00037 public:
00039 typedef SpatialObjectToImageFilter Self;
00040 typedef ImageSource<TOutputImage> Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042 typedef SmartPointer<const Self> ConstPointer;
00043 typedef typename TOutputImage::SizeType SizeType;
00044 typedef TOutputImage OutputImageType;
00045 typedef typename OutputImageType::Pointer OutputImagePointer;
00046
00048 itkNewMacro(Self);
00049
00051 itkTypeMacro(SpatialObjectToImageFilter,ImageSource);
00052
00054 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00055
00057 typedef TInputSpatialObject InputSpatialObjectType;
00058 typedef typename InputSpatialObjectType::Pointer InputSpatialObjectPointer;
00059 typedef typename InputSpatialObjectType::ConstPointer InputSpatialObjectConstPointer;
00060 typedef typename TInputSpatialObject::ChildrenListType ChildrenListType;
00061
00063 itkStaticConstMacro(ObjectDimension, unsigned int,
00064 InputSpatialObjectType::ObjectDimension);
00065 itkStaticConstMacro(OutputImageDimension, unsigned int,
00066 TOutputImage::ImageDimension);
00067
00069 virtual void SetInput( const InputSpatialObjectType *object);
00070 virtual void SetInput( unsigned int, const InputSpatialObjectType * object);
00071 const InputSpatialObjectType * GetInput(void);
00072 const InputSpatialObjectType * GetInput(unsigned int idx);
00073
00074 virtual void GenerateOutputInformation() {};
00075 virtual void GenerateData() ;
00076
00077 itkSetMacro(ChildrenDepth, unsigned int);
00078 itkGetMacro(ChildrenDepth, unsigned int);
00079
00081 itkSetMacro(Size,SizeType);
00082 itkGetMacro(Size,SizeType);
00083
00084 protected:
00085 SpatialObjectToImageFilter();
00086 ~SpatialObjectToImageFilter();
00087
00088 SizeType m_Size;
00089 unsigned int m_ChildrenDepth;
00090 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00091
00092 private:
00093 SpatialObjectToImageFilter(const Self&);
00094 void operator=(const Self&);
00095
00096
00097 };
00098
00099 }
00100
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "itkSpatialObjectToImageFilter.txx"
00103 #endif
00104
00105 #endif