Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkCartesianReadout.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_CartesianReadout_H
18 #define _MITK_CartesianReadout_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  // maximum echo at center of each line
40  m_NegTEhalf = -dt*(kxMax-(int)kxMax%2)/2;
41  }
43  {}
44 
46  {
47  double t = 0;
48  t = m_NegTEhalf + (double)index[0]*dt;
49  return t;
50  }
51 
53  {
54  double t = 0;
55  t = (double)index[0]*dt;
56  return t;
57  }
58 
60  {
61  // reverse phase
63  index[1] = kyMax-1-index[1];
64 
65  return index;
66  }
67 
69  {
71  {
73  MITK_WARN << "Echo time is too short! Time not sufficient to read slice. Automatically adjusted to " << m_Parameters->m_SignalGen.m_tEcho << " ms";
74  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";
75  }
76  }
77 
78 protected:
79 
80  double dt;
81  int kxMax;
82  int kyMax;
83 
84 };
85 
86 }
87 
88 #endif
89 
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.
bool m_ReversePhase
If true, the phase readout direction will be inverted (-y instead of y)
SignalGenerationParameters m_SignalGen
Signal generation parameters.
CartesianReadout(FiberfoxParameters< double > *parameters)
void AdjustEchoTime()
Depending on the k-space readout scheme and acquisition parameters the minimum TE varies...
#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.)
Realizes EPI readout: one echo, maximum intensity in the k-space center, zig-zag trajectory.
double GetRedoutTime(itk::Index< 2 > index)
Time passed since readout started in milliseconds.
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) ...
double GetTimeFromMaxEcho(itk::Index< 2 > index)
Time from maximum echo intensity in milliseconds.
FiberfoxParameters< double > * m_Parameters
Abstract class for k-space acquisiton type (k-space trajectory and echo placement) ...