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);
00069
00074
virtual void SetSpacing(
const double spacing[OutputImageDimension] );
00075
virtual void SetSpacing(
const float spacing[OutputImageDimension] );
00076
virtual const double* GetSpacing() const;
00077
00080 itkSetMacro(PathValue,
ValueType);
00081 itkGetMacro(PathValue, ValueType);
00082 itkSetMacro(BackgroundValue, ValueType);
00083 itkGetMacro(BackgroundValue, ValueType);
00084
00089 virtual
void SetOrigin( const
double origin[OutputImageDimension] );
00090 virtual
void SetOrigin( const
float origin[OutputImageDimension] );
00091 virtual const
double * GetOrigin() const;
00092
00094 itkSetMacro(
Size,
SizeType);
00095 itkGetMacro(Size,SizeType);
00096
00097 protected:
00098 PathToImageFilter();
00099 ~PathToImageFilter();
00100
00101 virtual
void GenerateOutputInformation(){};
00102
virtual void GenerateData();
00103
00104
00105 SizeType m_Size;
00106 double m_Spacing[OutputImageDimension];
00107
double m_Origin[OutputImageDimension];
00108
ValueType m_PathValue;
00109
ValueType m_BackgroundValue;
00110
00111 virtual void PrintSelf(std::ostream& os,
Indent indent)
const;
00112
00113 private:
00114 PathToImageFilter(
const Self&);
00115
void operator=(
const Self&);
00116
00117
00118 };
00119
00120 }
00121
00122
#ifndef ITK_MANUAL_INSTANTIATION
00123
#include "itkPathToImageFilter.txx"
00124
#endif
00125
00126
#endif