DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
itkDWISingleVoxelGenerator.h
Go to the documentation of this file.
1 
18 #ifndef __itkDWISingleVoxelGenerator_h
19 #define __itkDWISingleVoxelGenerator_h
20 
21 #include "utl.h"
22 #include "itkDWIGeneratorBase.h"
23 
24 namespace itk
25 {
26 
34 template <class TOutputImage, class TScalarImage=Image<float,3> >
35 class ITK_EXPORT DWISingleVoxelGenerator : public DWIGeneratorBase<TOutputImage, TScalarImage>
36 {
37 public:
41  typedef SmartPointer<Self> Pointer;
42 
44  itkNewMacro(Self);
45 
48 
50  typedef typename Superclass::OutputImageType OutputImageType;
51  typedef typename Superclass::OutputImagePointer OutputImagePointer;
52  typedef typename Superclass::OutputImageSizeType OutputImageSizeType;
53  typedef typename Superclass::OutputImageSpacingType OutputImageSpacingType;
54  typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
55  typedef typename Superclass::OutputImagePointType OutputImagePointType;
56  typedef typename Superclass::OutputImageDirectionType OutputImageDirectionType;
57  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
58  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
59  typedef typename Superclass::OutputImageInternalPixelType OutputImageInternalPixelType;
60 
62  itkStaticConstMacro(OutputImageDimension, unsigned int, OutputImageType::ImageDimension);
63 
65  typedef typename Superclass::ScalarImageType ScalarImageType;
66  typedef typename Superclass::ScalarImagePointer ScalarImagePointer;
67 
69  typedef typename Superclass::PrecisionType PrecisionType;
70  typedef typename Superclass::MatrixType MatrixType;
72  typedef typename Superclass::STDVectorType STDVectorType;
73  typedef typename Superclass::STDVectorPointer STDVectorPointer;
74 
76  typedef typename Superclass::DiffusionParameterValuesType DiffusionParameterValuesType;
77  typedef typename Superclass::DiffusionParameterContainerType DiffusionParameterContainerType;
78 
84  typedef enum
85  {
86  FIXED=0,
87  UNIFORM
88  } RandomType;
89 
90  itkSetMacro( StoredOrientationMatrix, MatrixPointer);
91  itkGetMacro( StoredOrientationMatrix, MatrixPointer );
92 
94  {
95  m_StoredOrientationMatrix = utl::ReadGradElectricRepulsion<double>(num,DIRECTION_NODUPLICATE,CARTESIAN_TO_CARTESIAN, DIRECTION_NOFLIP, DIRECTION_NOFLIP, DIRECTION_NOFLIP, true);
96  this->Modified();
97  }
98  void SetUniformFromTessellation(const int num)
99  {
100  m_StoredOrientationMatrix = utl::ReadGrad<double>(num,DIRECTION_NODUPLICATE,CARTESIAN_TO_CARTESIAN,DIRECTION_NOFLIP, DIRECTION_NOFLIP, DIRECTION_NOFLIP, true);
101  this->Modified();
102  }
103 
104 
105 
106  itkSetMacro( RandomType, RandomType );
107  itkGetMacro( RandomType, RandomType );
108 
110  itkSetMacro( DiffusionParameterValues, DiffusionParameterValuesType );
111  itkGetMacro( DiffusionParameterValues, DiffusionParameterValuesType );
112 
113 protected:
116 
117  typename LightObject::Pointer InternalClone() const;
118  void PrintSelf(std::ostream& os, Indent indent) const;
119 
121  void GenerateData();
122 
123  void Initialization();
124 
125  DiffusionParameterValuesType m_DiffusionParameterValues;
126 
127  RandomType m_RandomType;
128 
130 
131 private:
132  DWISingleVoxelGenerator(const Self&); //purposely not implemented
133  void operator=(const Self&); //purposely not implemented
134 
135 
136 };
137 
138 }
139 
140 #if !defined(ITK_MANUAL_INSTANTIATION) && !defined(__itkDWISingleVoxelGenerator_hxx)
142 #endif
143 
144 
145 #endif
146 
Superclass::OutputImageRegionType OutputImageRegionType
Superclass::OutputImagePointType OutputImagePointType
Superclass::OutputImageInternalPixelType OutputImageInternalPixelType
void SetUniformFromTessellation(const int num)
helper functions specifically used in dmritool
Superclass::OutputImageDirectionType OutputImageDirectionType
Superclass::OutputImageSpacingType OutputImageSpacingType
Superclass::ScalarImagePointer ScalarImagePointer
Superclass::DiffusionParameterContainerType DiffusionParameterContainerType
DiffusionParameterValuesType m_DiffusionParameterValues
Superclass::PrecisionType PrecisionType
Superclass::OutputImagePixelType OutputImagePixelType
Superclass::ScalarImageType ScalarImageType
Superclass::MatrixPointer MatrixPointer
Superclass::OutputImageType OutputImageType
utl_shared_ptr< MatrixType > MatrixPointer
Generate DWI data based on provided parameter file.
Generate DWI data with the same diffusion parameter set for all voxels. If random mode is used...
Superclass::DiffusionParameterValuesType DiffusionParameterValuesType
Superclass::STDVectorPointer STDVectorPointer
void SetUniformFromElectrostaticEnergy(const int num)
Superclass::OutputImageIndexType OutputImageIndexType
DWIGeneratorBase< TOutputImage, TScalarImage > Superclass
Superclass::OutputImageSizeType OutputImageSizeType
Superclass::STDVectorType STDVectorType
Superclass::OutputImagePointer OutputImagePointer