Skip to content

Write image orientation to MRD file#148

Open
h3lg3 wants to merge 5 commits intomainfrom
write_image_orientation_to_mrd
Open

Write image orientation to MRD file#148
h3lg3 wants to merge 5 commits intomainfrom
write_image_orientation_to_mrd

Conversation

@h3lg3
Copy link
Collaborator

@h3lg3 h3lg3 commented Feb 3, 2026

The raw_data/kspace orientation is based on the channel assignment for RO, PE1 and PE2 gradients of the PyPulseq sequence. This information is written to the MRD file, such that during later image reconstruction, the image can be properly saved to DICOM or Nifti using the correct orientation.
A remaining issue might be that the implemented mapping from console channel to physical orientation depends on the cabling of the console and can vary between different setups. One could add the "console-channel - physical gradient" mapping to the system configuration "system_info" in

system_info = get_nexus_acquisition_system(

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/console
   __init__.py10190%11
src/console/interfaces
   acquisition_data.py1232580%96–99, 110–111, 129–130, 145–148, 158–159, 188–189, 193–199, 216–217, 228, 232, 250
   acquisition_parameter.py107496%126, 163, 178, 213
   device_configuration.py50296%59, 65
   dimensions.py962277%45–46, 67–68, 71, 79, 89, 95, 101, 107, 113–115, 125–127, 137–139, 149–151
   rx_data.py861879%77–81, 89, 101, 105, 107, 122, 130–135, 143, 151, 154, 157
src/console/pulseq_interpreter
   sequence_provider.py2471893%180, 185, 199–201, 301–302, 395–396, 507, 557–558, 627, 653–654, 670, 679, 683
src/console/spcm_control
   abstract_device.py79790%2–149
   acquisition_control.py1531530%3–362
   rx_device.py2092090%2–493
   tx_device.py1751750%2–465
src/console/spcm_control/spcm
   pyspcm.py1611610%3–295
   tools.py54540%3–128
src/console/utilities
   json_encoder.py8362%22–24
   load_configuration.py20670%18–20, 28–30
   plot.py531670%31–32, 80–98
src/console/utilities/data
   mrd_helper.py43881%37, 43, 49, 52, 60, 63, 68, 71
   write_acquisition_to_mrd.py54591%69–70, 94, 112, 117
src/console/utilities/sequences/calibration
   fid_tx_adjust.py22195%66
   se_tx_adjust.py29293%62–64
src/console/utilities/sequences/spectrometry
   fid.py15150%2–75
   se_spectrum.py25292%51, 85
src/console/utilities/sequences/tse
   tse_3d.py2417569%108–109, 111–112, 114–115, 122–123, 125–127, 129–132, 143–146, 151–154, 161–172, 189, 211–218, 224, 255, 318–335, 342–343, 410, 413–425, 533–544
TOTAL5316105480% 

Tests Skipped Failures Errors Time
192 0 💤 0 ❌ 0 🔥 15.567s ⏱️

@h3lg3 h3lg3 marked this pull request as draft February 3, 2026 14:23
@h3lg3 h3lg3 requested a review from schote February 3, 2026 14:24
@h3lg3 h3lg3 marked this pull request as ready for review February 16, 2026 14:04
@h3lg3 h3lg3 marked this pull request as draft February 17, 2026 14:51
@h3lg3
Copy link
Collaborator Author

h3lg3 commented Feb 17, 2026

Imaging test showed that orientation are written correctly to dicom files.

@h3lg3 h3lg3 marked this pull request as ready for review February 17, 2026 17:13
@h3lg3 h3lg3 marked this pull request as draft February 24, 2026 08:48
@h3lg3 h3lg3 marked this pull request as ready for review February 24, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant