lamyj / dicomifier

A medical image converter
https://dicomifier.readthedocs.io/
Other
30 stars 7 forks source link

Does dicomifier support spectroscopy data? #60

Open Microdeep-ZL opened 1 month ago

Microdeep-ZL commented 1 month ago

Hi,

I want to convert Bruker spectroscopy data to DICOM. I tried dicomifier list and dicomifier to-dicom, both threw an error but I'm not sure whether it's because I didn't use dicomifier properly.

(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7/pdata/1$ ls
2dseq  id  methreco  outd  proc  proc2  proc2s  procs  reco  visu_pars
(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7/pdata/1$ dicomifier list .
usage: dicomifier list [-h] [--json] [--verbosity {warning,info,debug}] source [source ...]
dicomifier list: error: 'utf-8' codec can't decode byte 0x9c in position 22: invalid start byte
(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7/pdata/1$ dicomifier to-dicom . ~/Projects/FSLMRS_test/
WARNING - dicomifier: /home/nmr/Projects/FSLMRS_test is not empty
ERROR - dicomifier: . - Could not convert: 'VisuCoreOrientation'
(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7/pdata/1$ cd ../..
(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7$ dicomifier list .
usage: dicomifier list [-h] [--json] [--verbosity {warning,info,debug}] source [source ...]
dicomifier list: error: 'utf-8' codec can't decode byte 0xc1 in position 21: invalid start byte
(dicomifier) nmr@IMC-SPD-2203281:~/Projects/FSLMRS_test/20240926_145454_mrmd13C_RapidRatAbd_ev02_1_2/7$ dicomifier to-dicom . ~/Projects/FSLMRS_test/
WARNING - dicomifier: /home/nmr/Projects/FSLMRS_test is not empty
ERROR - dicomifier: pdata/1 - Could not convert: 'VisuCoreOrientation'

And it'll be great if there can be this feature. Thanks!

lamyj commented 1 month ago

There are two different issues here:

  1. dicomifier list should work regardless of the data being listed, so, given the error, there is probably an unexpected encoding in one of the text fields
  2. Conversion of non-image fails since the transform from the gradient coordinate system to the subject coordinate system (stored in the Bruker field VisuCoreOrientation) is missing

Could you