Skip to content

Commit

Permalink
Merge pull request #94 from rajramasawmy/rel_tab_pos
Browse files Browse the repository at this point in the history
Relative table position
  • Loading branch information
kspaceKelvin authored Apr 4, 2022
2 parents b87759e + a5c66ab commit 0ea38be
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ message(STATUS "Looking for packages in : ${CMAKE_PREFIX_PATH}")
#VERSIONING
set(SIEMENS_TO_ISMRMRD_VERSION_MAJOR 1)
set(SIEMENS_TO_ISMRMRD_VERSION_MINOR 2)
set(SIEMENS_TO_ISMRMRD_VERSION_PATCH 2)
set(SIEMENS_TO_ISMRMRD_VERSION_PATCH 3)
set(SIEMENS_TO_ISMRMRD_VERSION_STRING ${SIEMENS_TO_ISMRMRD_VERSION_MAJOR}.${SIEMENS_TO_ISMRMRD_VERSION_MINOR}.${SIEMENS_TO_ISMRMRD_VERSION_PATCH})

# Generate the converter_version.h header file
Expand Down Expand Up @@ -67,7 +67,7 @@ set(Boost_USE_STATIC_RUNTIME OFF)


find_package(Boost COMPONENTS system thread program_options filesystem timer REQUIRED)
find_package(ISMRMRD 1.7.0 REQUIRED)
find_package(ISMRMRD 1.8.0 REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C)

include_directories( ${ISMRMRD_INCLUDE_DIR} ${HDF5_C_INCLUDE_DIR} )
Expand Down
2 changes: 1 addition & 1 deletion dependencies/ismrmrd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7354a092536876a6bf675d73eb5e05a953a1a5b0
5672c474292f0b87e9c0aedcb5f1bc87ef0544f8
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,9 +1105,9 @@ getAcquisition(bool flash_pat_ref_scan, const Trajectory &trajectory, long dwell
}
// std::cout << "ismrmrd_acq.sample_time_us(): " << ismrmrd_acq.sample_time_us() << std::endl;

ismrmrd_acq.position()[0] = scanhead.sSliceData.sSlicePosVec.flSag + (float) (global_table_pos[0]);
ismrmrd_acq.position()[1] = scanhead.sSliceData.sSlicePosVec.flCor + (float) (global_table_pos[1]);
ismrmrd_acq.position()[2] = scanhead.sSliceData.sSlicePosVec.flTra + (float) (global_table_pos[2]);
ismrmrd_acq.position()[0] = scanhead.sSliceData.sSlicePosVec.flSag;// + (float) (global_table_pos[0]);
ismrmrd_acq.position()[1] = scanhead.sSliceData.sSlicePosVec.flCor;// + (float) (global_table_pos[1]);
ismrmrd_acq.position()[2] = scanhead.sSliceData.sSlicePosVec.flTra;// + (float) (global_table_pos[2]);

// Convert Siemens quaternions to direction cosines.
// In the Siemens convention the quaternion corresponds to a rotation matrix with columns P R S
Expand Down
3 changes: 3 additions & 0 deletions parameter_maps/IsmrmrdParameterMap_Siemens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
<!-- measurementInformationType -->
<p><s>HEADER.MeasUID</s> <d>siemens.HEADER.MeasUID</d></p>
<p><s>YAPS.tPatientPosition</s> <d>siemens.YAPS.tPatientPosition</d></p>
<p><s>DICOM.lGlobalTablePosSag</s> <d>siemens.DICOM.lGlobalTablePosSag</d></p>
<p><s>DICOM.lGlobalTablePosCor</s> <d>siemens.DICOM.lGlobalTablePosCor</d></p>
<p><s>DICOM.lGlobalTablePosTra</s> <d>siemens.DICOM.lGlobalTablePosTra</d></p>
<p><s>MEAS.tProtocolName</s> <d>siemens.MEAS.tProtocolName</d></p>
<p><s>YAPS.ReconMeasDependencies.0</s> <d>siemens.YAPS.ReconMeasDependencies.RFMap</d></p>
<p><s>YAPS.ReconMeasDependencies.1</s> <d>siemens.YAPS.ReconMeasDependencies.SenMap</d></p>
Expand Down
29 changes: 29 additions & 0 deletions parameter_maps/IsmrmrdParameterMap_Siemens.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,38 @@
<xsl:value-of
select="concat(string(siemens/DICOM/DeviceSerialNumber), $strSeperator, $patientID, $strSeperator, $studyID, $strSeperator, string(siemens/HEADER/MeasUID))"/>
</measurementID>

<patientPosition>
<xsl:value-of select="siemens/YAPS/tPatientPosition"/>
</patientPosition>

<relativeTablePosition>
<x>
<xsl:choose>
<xsl:when test="siemens/DICOM/lGlobalTablePosSag">
<xsl:value-of select="siemens/DICOM/lGlobalTablePosSag"/>
</xsl:when>
<xsl:otherwise>0.0</xsl:otherwise>
</xsl:choose>
</x>
<y>
<xsl:choose>
<xsl:when test="siemens/DICOM/lGlobalTablePosCor">
<xsl:value-of select="siemens/DICOM/lGlobalTablePosCor"/>
</xsl:when>
<xsl:otherwise>0.0</xsl:otherwise>
</xsl:choose>
</y>
<z>
<xsl:choose>
<xsl:when test="siemens/DICOM/lGlobalTablePosTra">
<xsl:value-of select="siemens/DICOM/lGlobalTablePosTra"/>
</xsl:when>
<xsl:otherwise>0.0</xsl:otherwise>
</xsl:choose>
</z>
</relativeTablePosition>

<protocolName>
<xsl:value-of select="siemens/MEAS/tProtocolName"/>
</protocolName>
Expand Down

0 comments on commit 0ea38be

Please sign in to comment.