Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkSingleShotEpi.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_SingleShotEpi_H
18 #define _MITK_SingleShotEpi_H
19 
20 #include <mitkAcquisitionType.h>
21 
22 namespace mitk {
23 
29 {
30 public:
31 
33  {
36 
37  dt = m_Parameters->m_SignalGen.m_tLine/kxMax; // time to read one k-space voxel
38 
39  // k-space center at maximum echo
40  if ( kyMax%2==0 )
41  {
43  }
44  else
46  }
48  {}
49 
51  {
52  double t = 0;
53  t = m_NegTEhalf + ((double)index[1]*kxMax+(double)index[0])*dt;
54  return t;
55  }
56 
58  {
59  double t = 0;
60  t = ((double)index[1]*kxMax+(double)index[0])*dt;
61  return t;
62  }
63 
65  {
66  // reverse phase
68  index[1] = kyMax-1-index[1];
69 
70  // reverse readout direction
71  if (index[1]%2 == 1)
72  index[0] = kxMax-index[0]-1;
73 
74  return index;
75  }
76 
78  {
80 
82  {
84  MITK_WARN << "Echo time is too short! Time not sufficient to read slice. Automatically adjusted to " << m_Parameters->m_SignalGen.m_tEcho << " ms";
85  m_Parameters->m_Misc.m_AfterSimulationMessage += "Echo time was chosen too short! Time not sufficient to read slice. Internally adjusted to " + boost::lexical_cast<string>(m_Parameters->m_SignalGen.m_tEcho) + " ms\n";
86  }
87  }
88 
89 protected:
90 
91  double dt;
92  int kxMax;
93  int kyMax;
94 
95 };
96 
97 }
98 
99 #endif
100 
MiscFiberfoxParameters m_Misc
GUI realted and I/O parameters.
itk::ImageRegion< 3 > m_CroppedRegion
Image size with reduced FOV.
double m_tLine
k-space line readout time (dwell time).
DataCollection - Class to facilitate loading/accessing structured data.
double m_PartialFourier
Partial fourier factor (0.5-1)
SingleShotEpi(FiberfoxParameters< double > *parameters)
void AdjustEchoTime()
Depending on the k-space readout scheme and acquisition parameters the minimum TE varies...
bool m_ReversePhase
If true, the phase readout direction will be inverted (-y instead of y)
SignalGenerationParameters m_SignalGen
Signal generation parameters.
#define MITK_WARN
Definition: mitkLogMacros.h:23
string m_AfterSimulationMessage
Store messages that are displayed after the simulation has finished (e.g. warnings, automatic parameter adjustments etc.)
double m_NegTEhalf
negative time to read half the k-space (needed to calculate the ms from the maximum echo); THIS IS NO...
itk::Index< 2 > GetActualKspaceIndex(itk::Index< 2 > index)
Transfer simple image iterator index to desired k-space index (depends on k-space readout scheme) ...
Realizes EPI readout: one echo, maximum intensity in the k-space center, zig-zag trajectory.
double GetTimeFromMaxEcho(itk::Index< 2 > index)
Time from maximum echo intensity in milliseconds.
double GetRedoutTime(itk::Index< 2 > index)
Time passed since readout started in milliseconds.
FiberfoxParameters< double > * m_Parameters
Abstract class for k-space acquisiton type (k-space trajectory and echo placement) ...