itkPathToImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkPathToImageFilter_h
00018 #define __itkPathToImageFilter_h
00019
00020 #include "itkImageSource.h"
00021 #include "itkConceptChecking.h"
00022
00023 namespace itk
00024 {
00025
00034 template <class TInputPath, class TOutputImage>
00035 class ITK_EXPORT PathToImageFilter : public ImageSource<TOutputImage>
00036 {
00037 public:
00039 typedef PathToImageFilter Self;
00040 typedef ImageSource<TOutputImage> Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042 typedef SmartPointer<const Self> ConstPointer;
00043
00045 itkNewMacro(Self);
00046
00048 itkTypeMacro(PathToImageFilter,ImageSource);
00049
00051 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00052 typedef TInputPath InputPathType;
00053 typedef typename InputPathType::Pointer InputPathPointer;
00054 typedef typename InputPathType::ConstPointer InputPathConstPointer;
00055 typedef TOutputImage OutputImageType;
00056 typedef typename OutputImageType::Pointer OutputImagePointer;
00057 typedef typename OutputImageType::SizeType SizeType;
00058 typedef typename OutputImageType::ValueType ValueType;
00059
00061 itkStaticConstMacro(OutputImageDimension, unsigned int,
00062 TOutputImage::ImageDimension);
00063
00065 virtual void SetInput( const InputPathType *path);
00066 virtual void SetInput( unsigned int, const TInputPath * path);
00067 const InputPathType * GetInput(void);
00068 const InputPathType * GetInput(unsigned int idx);
00070
00075 virtual void SetSpacing( const double* spacing);
00076 virtual void SetSpacing( const float* spacing);
00077 virtual const double* GetSpacing() const;
00079
00082 itkSetMacro(PathValue, ValueType);
00083 itkGetMacro(PathValue, ValueType);
00084 itkSetMacro(BackgroundValue, ValueType);
00085 itkGetMacro(BackgroundValue, ValueType);
00087
00092 virtual void SetOrigin( const double* origin);
00093 virtual void SetOrigin( const float* origin);
00094 virtual const double * GetOrigin() const;
00096
00098 itkSetMacro(Size,SizeType);
00099 itkGetMacro(Size,SizeType);
00101
00102 protected:
00103 PathToImageFilter();
00104 ~PathToImageFilter();
00105
00106 virtual void GenerateOutputInformation(){};
00107 virtual void GenerateData();
00108
00109
00110 SizeType m_Size;
00111 double m_Spacing[OutputImageDimension];
00112 double m_Origin[OutputImageDimension];
00113 ValueType m_PathValue;
00114 ValueType m_BackgroundValue;
00115
00116 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00117
00118 private:
00119 PathToImageFilter(const Self&);
00120 void operator=(const Self&);
00121
00122 };
00123
00124 }
00125
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkPathToImageFilter.txx"
00128 #endif
00129
00130 #endif
00131