diff --git a/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkKspaceReadout.h b/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkKspaceReadout.h index cc9d545a12..6e22acfca8 100644 --- a/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkKspaceReadout.h +++ b/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkKspaceReadout.h @@ -1,53 +1,53 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _MITK_KspaceReadout_H #define _MITK_KspaceReadout_H #include #include namespace mitk { /** * \brief Abstract class for k-space readout schemes * */ class KspaceReadout { public: KspaceReadout(FiberfoxParameters& parameters) { m_Parameters = parameters; } - ~KspaceReadout(){} + virtual ~KspaceReadout(){} virtual double GetTimeFromMaxEcho(itk::Index< 2 > index) = 0; ///< time from maximum echo intensity in milliseconds virtual double GetRedoutTime(itk::Index< 2 > index) = 0; ///< time passed since readout started in milliseconds virtual itk::Index< 2 > GetActualKspaceIndex(itk::Index< 2 > index) = 0; ///< transfer simple image iterator index to desired k-space index (depends on k-space readout scheme) protected: double m_TEhalf; FiberfoxParameters m_Parameters; itk::Size< 2 > m_Size; }; } #endif diff --git a/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkSingleShotEpi.h b/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkSingleShotEpi.h index 2834fe4fbf..2e7447f8f9 100644 --- a/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkSingleShotEpi.h +++ b/Modules/DiffusionImaging/FiberTracking/Fiberfox/Sequences/mitkSingleShotEpi.h @@ -1,87 +1,88 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _MITK_SingleShotEpi_H #define _MITK_SingleShotEpi_H #include namespace mitk { /** * \brief Realizes EPI readout * */ class SingleShotEpi : public KspaceReadout { public: SingleShotEpi(FiberfoxParameters& parameters) : KspaceReadout(parameters) { kxMax = m_Parameters.m_SignalGen.m_CroppedRegion.GetSize(0); kyMax = m_Parameters.m_SignalGen.m_CroppedRegion.GetSize(1); dt = m_Parameters.m_SignalGen.m_tLine/kxMax; // time to read one k-space voxel // k-space center at maximum echo if ( kyMax%2==0 ) { m_TEhalf = -m_Parameters.m_SignalGen.m_tLine*(kyMax-1)/2 + dt*(kxMax-(int)kxMax%2)/2; } else m_TEhalf = -m_Parameters.m_SignalGen.m_tLine*(kyMax-1)/2 - dt*(kxMax-(int)kxMax%2)/2; } - ~SingleShotEpi(){} + ~SingleShotEpi() + {} double GetTimeFromMaxEcho(itk::Index< 2 > index) { double t = 0; t = m_TEhalf + ((double)index[1]*kxMax+(double)index[0])*dt; return t; } double GetRedoutTime(itk::Index< 2 > index) { double t = 0; t = ((double)index[1]*kxMax+(double)index[0])*dt; return t; } itk::Index< 2 > GetActualKspaceIndex(itk::Index< 2 > index) { // reverse phase if (!m_Parameters.m_SignalGen.m_ReversePhase) index[1] = kyMax-1-index[1]; // reverse readout direction if (index[1]%2 == 1) index[0] = kxMax-index[0]-1; return index; } protected: double dt; int kxMax; int kyMax; }; } #endif