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 _itk_TensorImageToDiffusionImageFilter_h_
00018 #define _itk_TensorImageToDiffusionImageFilter_h_
00019
00020 #include "itkImageToImageFilter.h"
00021
00022
00023 namespace itk
00024 {
00025
00026 template <class TInputScalarType, class TOutputScalarType>
00027 class TensorImageToDiffusionImageFilter
00028 : public ImageToImageFilter<itk::Image<itk::DiffusionTensor3D<TInputScalarType>,3>, itk::VectorImage<TOutputScalarType,3> >
00029 {
00030
00031 public:
00032
00033 typedef TInputScalarType InputScalarType;
00034 typedef itk::DiffusionTensor3D<InputScalarType> InputPixelType;
00035 typedef itk::Image<InputPixelType,3> InputImageType;
00036 typedef typename InputImageType::RegionType InputImageRegionType;
00037
00038 typedef TOutputScalarType OutputScalarType;
00039 typedef itk::VectorImage<OutputScalarType,3> OutputImageType;
00040 typedef typename OutputImageType::PixelType OutputPixelType;
00041 typedef typename OutputImageType::RegionType OutputImageRegionType;
00042
00043 typedef OutputScalarType BaselineScalarType;
00044 typedef BaselineScalarType BaselinePixelType;
00045 typedef typename itk::Image<BaselinePixelType,3> BaselineImageType;
00046 typedef typename BaselineImageType::RegionType BaselineImageRegionType;
00047
00048 typedef TensorImageToDiffusionImageFilter Self;
00049 typedef ImageToImageFilter<InputImageType, OutputImageType> Superclass;
00050
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00054 itkTypeMacro (TensorImageToDiffusionImageFilter, ImageToImageFilter);
00055
00056 itkStaticConstMacro (ImageDimension, unsigned int,
00057 OutputImageType::ImageDimension);
00058
00059 itkNewMacro (Self);
00060
00061 typedef Vector<double,3> GradientType;
00062 typedef std::vector<GradientType> GradientListType;
00063
00065 void SetGradientList(const GradientListType list)
00066 {
00067 m_GradientList = list;
00068 this->Modified();
00069 }
00070 GradientListType GetGradientList(void) const
00071 {return m_GradientList;}
00072
00073
00074 void SetBValue( const double& bval)
00075 { m_BValue = bval; }
00076
00077 protected:
00078 TensorImageToDiffusionImageFilter()
00079 {
00080 m_BValue = 1.0;
00081 m_BaselineImage = 0;
00082 };
00083 ~TensorImageToDiffusionImageFilter(){};
00084
00085 void PrintSelf (std::ostream& os, Indent indent) const
00086 {
00087 Superclass::PrintSelf (os, indent);
00088 }
00089
00090 void BeforeThreadedGenerateData( void );
00091
00092 void ThreadedGenerateData( const
00093 OutputImageRegionType &outputRegionForThread, int);
00094
00095
00096
00097 private:
00098
00099 TensorImageToDiffusionImageFilter (const Self&);
00100 void operator=(const Self&);
00101
00102 GradientListType m_GradientList;
00103 double m_BValue;
00104 typename BaselineImageType::Pointer m_BaselineImage;
00105
00106 };
00107
00108
00109 }
00110
00111
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkTensorImageToDiffusionImageFilter.txx"
00114 #endif
00115
00116
00117 #endif