ismrmrd / siemens_to_ismrmrd

Siemens ISMRMRD converter
Other
39 stars 51 forks source link

Unsaved profiles flags multi-echo GRE 7T #101

Open Laura2305 opened 2 years ago

Laura2305 commented 2 years ago

I'm converting multi-echo data acquired at 7T using the official Siemens GRE sequence. I would need to use the flag values, which should be saved in the head of each data profile. The issue is that the first 25 flag bits are correctly saved, but the others are lost. However, when I print the flags before calling the function appendAcquisition (line 954 in main.cpp), all the flag bits are there. Apparently part of them is lost when writing to the .h5 file. I get these two warning at the end of the conversion: WARNING: Unexpected number of mystery bytes detected: 192 Please check the result. WARNING: End of file was not reached during conversion. There are 384 additional bytes at the end of file. All the values other than the flags seem to be correctly converted.

hansenms commented 2 years ago

There is not a 1:1 correspondence between flags in Siemens MDH header and ISMRMRD Acquisition flags, so I would not expect all flags to just be reproduced. You may have to modify the code the make sure the specific flags you want are transferred.

Laura2305 commented 2 years ago

Thank you for your quick response. I know there is no correspondence between the Siemens MDH flags and the ISMRMRD Acquisition flags. I am only considering the ISMRMRD flags. I would expect 31 flags to be saved in the .h5 file because this is the number of flags that are converted from Siemens MDH to ISMRMRD. Indeed, when I print the flags after the conversion, from the siemens_to_ismrmrd code (e.g., within the function ismrmrd_append_acquisition) I get 31 values. However, when I read the flags from the converted .h5 file, I only get the first 25 values. As you say, I could move the relevant flags in the first 25 bits, but I feel like this is not an optimal solution as other researchers may encounter the same problem.

This only happens for 7T data acquired with the GRE sequence. I have not tested other sequences, but for data collected at 3T with the same sequence, all 31 ISMRMRD flags are saved and available to be read from the .h5 file.

hansenms commented 2 years ago

I am very puzzled by this. Especially your last statement. At first, I thought there might be a bug in the converter or more specifically the ISMRMRD library that means that the last flags are not written to the file, but you say it works with some files and not with others, which is surprising. Would it be possible for you to post some more details and possibly data to reproduce this problem?

Laura2305 commented 2 years ago

I can share some phantom data acquired at 3T and 7T with the multi-echo GRE sequence. The 3T data are under-sampled, the 7T data are not, but the outcome is the same with 7T under sampled data. Let me know if you need more details in order to reproduce the problem.

Link to data

hansenms commented 2 years ago

@xueh2 or @kspaceKelvin would you guys have any thoughts here.

xueh2 commented 2 years ago

What is the software version for the data? VE or NX?

Laura2305 commented 2 years ago

@xueh2 the software version is VE for both acquisitions.