Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkStickModel.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _MITK_StickModel_H
18 #define _MITK_StickModel_H
19 
21 
22 namespace mitk {
23 
29 template< class ScalarType = double >
30 class StickModel : public DiffusionSignalModel< ScalarType >
31 {
32 public:
33 
34  StickModel();
35  template< class OtherType >StickModel(StickModel<OtherType>* model)
36  {
37  this->m_CompartmentId = model->m_CompartmentId;
38  this->m_T2 = model->GetT2();
39  this->m_FiberDirection = model->GetFiberDirection();
40  this->m_GradientList = model->GetGradientList();
42  this->m_RandGen = model->GetRandomGenerator();
43 
44  this->m_BValue = model->GetBvalue();
45  this->m_Diffusivity = model->GetDiffusivity();
46  }
47  ~StickModel();
48 
52 
54  PixelType SimulateMeasurement();
55  ScalarType SimulateMeasurement(unsigned int dir);
56 
57  void SetBvalue(double bValue) { m_BValue = bValue; }
58  double GetBvalue() { return m_BValue; }
59  void SetDiffusivity(double diffusivity) { m_Diffusivity = diffusivity; }
60  double GetDiffusivity() { return m_Diffusivity; }
61 
62  void SetFiberDirection(GradientType fiberDirection){ this->m_FiberDirection = fiberDirection; }
63  void SetGradientList(GradientListType gradientList) { this->m_GradientList = gradientList; }
64 
65 protected:
66 
67  double m_Diffusivity;
68  double m_BValue;
69 };
70 
71 }
72 
73 #include "mitkStickModel.cpp"
74 
75 #endif
76 
GradientType m_FiberDirection
Needed to generate anisotropc signal to determin direction of anisotropy.
double m_Diffusivity
Scalar diffusion constant.
unsigned int m_CompartmentId
GUI flag. Which compartment is this model assigned to?
PixelType SimulateMeasurement()
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
ItkRandGenType::Pointer m_RandGen
Random number generator.
GradientListType m_GradientList
Diffusion gradient direction container.
ItkDoubleImgType::Pointer m_VolumeFractionImage
Tissue specific volume fraction for each voxel (only relevant for non fiber compartments) ...
std::vector< GradientType > GradientListType
Abstract class for diffusion signal models.
itk::Vector< double, 3 > GradientType
void SetDiffusivity(double diffusivity)
Scalar diffusion constant.
StickModel(StickModel< OtherType > *model)
void SetGradientList(GradientListType gradientList)
Generates the diffusion signal using an idealised cylinder with zero radius: e^(-bd(ng)²) ...
DiffusionSignalModel< ScalarType >::GradientListType GradientListType
DiffusionSignalModel< ScalarType >::PixelType PixelType
void SetFiberDirection(GradientType fiberDirection)
ItkDoubleImgType::Pointer GetVolumeFractionImage()
double GetDiffusivity()
double m_BValue
b-value used to generate the artificial signal
DiffusionSignalModel< ScalarType >::GradientType GradientType
void SetBvalue(double bValue)
b-value used to generate the artificial signal
double m_T2
Tissue specific transversal relaxation time.
ItkRandGenType::Pointer GetRandomGenerator()