Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twixread does not seem to work with recent raw Siemens data #288

Closed
mjherold opened this issue Jun 17, 2022 · 16 comments
Closed

twixread does not seem to work with recent raw Siemens data #288

mjherold opened this issue Jun 17, 2022 · 16 comments

Comments

@mjherold
Copy link

I have two raw datasets (saved with twixtool) from the same Prisma Fit scanner, with the more recent data set acquired with VE11E software. While the "twixread" function of BART does work with the older data set (VE11B), twixread fails with raw data set obtained with VE11E. In both cases the data were acquired with the same 3-plane localizer sequence.

cmr@cmr1:~/bart$ ./bart twixread -A /home/cmr/rawdat/meas_MID00331_FID30508_3PL_LOC.dat ~/test
WARN: BART version is not reproducible.
VD Header. MeasID: 331 FileID: 30508 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: 3PL LOC
VD Header. MeasID: 331 FileID: 30508 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: 3PL LOC
WARN: Wrong number of samples: 1 != 0.
WARN: Stopping.
cmr@cmr1:~/bart$ ./bart twixread -A /home/cmr/rawdat/meas_MID00540_FID284271_3PL_LOC.dat ~/test
WARN: BART version is not reproducible.
bart: src/twixread.c:78: siemens_meas_setup: Assertion `(0 < hdr->nscans) && (hdr->nscans < 30)' failed.
Aborted (core dumped)
cmr@cmr1:~/bart$

I am using BART version v0.7.00-526-g093559f-dirty. Tried this under Ubuntu, and Mac OS x. In both cases same issue. Is the twixread function in BART not compatible with raw data from VE11E?

thank you!

Michael

@hcmh
Copy link
Member

hcmh commented Jun 20, 2022

Hi Michael,

could you try again with the commits I just pushed? They seem to work for our VE data. But you are right, previously, bart would not read newer Siemens data correctly.

Best regards,
Christian

@mjherold
Copy link
Author

Hi Christian:

Thank you very much for getting back about this problem!

It looks to me like the in include in read.h of the ismrm subfolder should say #include "ismrm/ismrmrd.h" instead of "ismrmrd/ismrmrd.h" or one can create a symbolic link named isrmrmrd pointing to ismrm. At least this got me further along the compilation chain. Also the .h files ismrmrd.h and export.h were missing. I copied them to the ismrm subfolder of ~/bart/src. But maybe this all led to the next problem...

When I try to compile bart with gcc-11 under OS X I (for x86_64 arch) get an error saying:

Undefined symbols for architecture x86_64:
  "_ismrm_read_encoding_limits", referenced from:
      _ismrm_read_dims in libismrm.a(read.o)
  "_nlop_tf_create", referenced from:
      _opt_reg_configure in libgrecon.a(optreg.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [bart] Error 1

I am probably doing something wrong here ... but I did not seem to have this problem with the previous version when I compiled under OS X.

Compilation under Ubuntu is in comparison smooth sailing, but it seems the problem got worse as I get core-dumps with all raw .dat files I try using the new version of bart.

cmr@cmr-gadgetron:~/bart_0.7$ ./bart version
WARN: BART version is not reproducible.
v0.7.00-526-g093559f-dirty
cmr@cmr-gadgetron:~/bart_0.7$ ./bart twixread ~/rawdat/meas_MID00331_FID30508_3PL_LOC.dat test
WARN: BART version is not reproducible.
VD Header. MeasID: 331 FileID: 30508 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: 3PL LOC
WARN: Wrong number of samples: 1 != 0.
WARN: Stopping.
cmr@cmr-gadgetron:~/bart$ ./bart version
v0.7.00-529-g50905f7
cmr@cmr-gadgetron:~/bart$ ./bart twixread ~/rawdat/meas_MID00331_FID30508_3PL_LOC.dat test
VD/VE Header. MeasID: 331 FileID: 30508 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: 3PL LOC
ERROR: Incorrect number of ADCs read! ADC count difference: 1 != 0!
Aborted (core dumped)

Any help would be much appreciated!

Thank you! and best regards,

Michael

@jtamir
Copy link
Member

jtamir commented Jun 20, 2022

Hi Michael and Christian,

I was able to confirm this works for data from XA both on Linux and Mac, where the previous commit 093559f did not work correctly. Note I did not try to install ISMRMRD. I used gcc11 on Mac.

@mjherold
Copy link
Author

Thank you Jon! Would you mind sharing your Makefile?

Thanks,

Michael

@jtamir
Copy link
Member

jtamir commented Jun 20, 2022

For Mac using Macports, my Makefile is the same as https://github.com/mrirecon/bart/blob/master/Makefile
I have the following local Makefile:

~/bart $ cat Makefile.local
PARALLEL=1
CC=gcc-mp-11

You might want to try make allclean followed by make

@mjherold
Copy link
Author

Thank you Jon!

Just managed to compile bart under OS X.

Still get errors with .dat files acquired under VE11E on Siemens Aera and Siemens Prisma scanners.

PHS010803:bart mj847$ ./bart version
WARN: BART version is not reproducible.
v0.7.00-529-g50905f7-dirty
PHS010803:bart mj847$ ./bart twixread -A /Volumes/MICHAEL/meas_MID00310_FID287610_LOCALIZER.dat test
WARN: BART version is not reproducible.
Assertion failed: ((0 < hdr->nscans) && (hdr->nscans < 30)), function siemens_meas_setup, file src/twixread.c, line 79.
Abort trap: 6
PHS010803:bart mj847$ ./bart twixread -A /Volumes/MICHAEL/Aera_L1_June_2022/meas_MID07247_FID347202_3PL_LOC.dat test
WARN: BART version is not reproducible.
VD/VE Header. MeasID: 7247 FileID: 347202 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: 3PL LOC
ERROR: Could not automatically determine dimensions, adc read error!
Abort trap: 6

@mjherold
Copy link
Author

For reference I used "siemens_to_ismrmrd" to read the raw data file giving trouble with bart.

PHS010803:bart mj847$ siemens_to_ismrmrd -z 2 -f '/Users/mj847/Downloads/Siemens raw/meas_MID00186_FID30751_MOLLI_5_3_1.dat' test
Siemens file is: /Users/mj847/Downloads/Siemens raw/meas_MID00186_FID30751_MOLLI_5_3_1.dat
Output file not specified -- using /Users/mj847/Downloads/Siemens raw/meas_MID00186_FID30751_MOLLI_5_3_1.mrd
-----------------------------------------------------------------
Converting measurement 2 into file /Users/mj847/Downloads/Siemens raw/meas_MID00186_FID30751_MOLLI_5_3_1.mrd in group dataset
-----------------------------------------------------------------
Using parameter map: IsmrmrdParameterMap_Siemens.xml
This file contains 2 measurement(s).
VD line file detected.
Protocol name [1]: AdjCoilSens
Protocol name [2]: T1Map_MOLLI_5_3_1_for_pre_and_post_contrast
Number of parameter buffers: 6
Buffer Name: Config
Buffer Name: Dicom
Buffer Name: Meas
Buffer Name: MeasYaps
Buffer Name: Phoenix
Buffer Name: Spice
Trajectory is: 1
Failed to find YAPS.lFirstFourierPartition array
center_line = 67
center_partition = 0
Baseline: N4_VE11E_LATEST_20181129
Software version: syngo MR E11
Protocol name: T1Map_MOLLI_5_3_1_for_pre_and_post_contrast
Dwell time: 2200
Using parameter XSL: IsmrmrdParameterMap_Siemens.xsl
Study time: 13:08:54
Last scan reached...
PHS010803:bart mj847$ ./bart version
WARN: BART version is not reproducible.
v0.7.00-529-g50905f7-dirty
PHS010803:bart mj847$ ./bart twixread -A '/Users/mj847/Downloads/Siemens raw/meas_MID00186_FID30751_MOLLI_5_3_1.dat' test
WARN: BART version is not reproducible.
VD/VE Header. MeasID: 186 FileID: 30751 Scans: 2
Patient: xxxxxxxxxxxxxxxxxxxxxxxxx
Protocol: T1Map_MOLLI_5_3_1_for_pre_and_post_contrast
ERROR: Could not automatically determine dimensions, adc read error!
Abort trap: 6

As I managed to compile bart with ISMRM=1 I could first convert to ismrm format and then use that file with bart. I was still hoping to get the twixread function in bart to work with these files...

@hcmh
Copy link
Member

hcmh commented Jun 23, 2022

Well, then it seems that there are still issues with the support for VE. Would it be possible to get access to a dataset that does not work? For example by e-Mail? If these are human data, maybe a phantom measurement would be more appropriate to share.

But with such a dataset I could try to iron out remaining bugs in twixread.

@mjherold
Copy link
Author

mjherold commented Jun 26, 2022 via email

@hcmh
Copy link
Member

hcmh commented Jun 26, 2022

Hi Michael,

Unfortunately, this is public. You could share the link to holme@tugraz.at , then I will take a look.

Best wishes,
Christian

@hcmh hcmh closed this as completed in 1a3e77e Jul 1, 2022
@hcmh
Copy link
Member

hcmh commented Jul 1, 2022

Thank you for the data!

Now, twixread should be able to read those datasets. If you find others that do not work, please reopen this issue or raise a new one.

Best wishes,
Christian

@mjherold
Copy link
Author

mjherold commented Jul 1, 2022 via email

@mjherold
Copy link
Author

mjherold commented Oct 11, 2022 via email

@dabosch
Copy link

dabosch commented Oct 6, 2024

Hi,
I know this is an old issue, but I'm still having trouble reading twix files from VE12U. I compiled BART without ISMRMRD support, and tested both with v0.9.0 and with the most recent commit (d9d1962)

This is the error I'm getting:

[dbosch@nyx-login0 ~]$ bart twixread meas_MID00063_FID16996_ep2d_bold_SMS3_R4_12sl_3rep.dat sms3
VD/VE Header. MeasID: 63 FileID: 16996 Scans: 1
Patient: xxxxxxxxxxxxxxxxxxxxxxxx
Protocol: ep2d_bold_SMS3_R4_12sl_3rep
ERROR: Incorrect number of ADCs read! ADC count difference: 1 != 0!
Aborted (core dumped)
[dbosch@nyx-login0 ~]$ 

This is happening for all files I've tested. One file can be found here:
https://owncloud.tuebingen.mpg.de/index.php/s/EKTrJcEgCAf24DP (will delete the file after 20. October 2024, let me know if you need it afterwards)

Thanks for looking into this!
Dario

@jtamir
Copy link
Member

jtamir commented Oct 7, 2024 via email

@dabosch
Copy link

dabosch commented Oct 10, 2024

Hi,
Thank you, I did not know about the -A flag. I guess I should read the documentation more carefully...
Now it works for me too...

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

No branches or pull requests

4 participants