[MINC-users] bug in dcm2mnc

Alex Zijdenbos alex at bic.mni.mcgill.ca
Sun Dec 9 14:58:04 EST 2007


Hi all,

[posting this wide as many may be affected]

I stumbled across a bug in dcm2mnc which mangles echo times. From dicom_read.c:

    gi_ptr->acq.echo_time =
        acr_find_double(group_list, ACR_Echo_time, -DBL_MAX);
    if (gi_ptr->acq.echo_time != -DBL_MAX)
        gi_ptr->acq.echo_time /= 1000.0;

    gi_ptr->acq.echo_time =
        acr_find_double(group_list, ACR_Echo_train_length, -DBL_MAX);
/*added echo train length ilana*/

That last one overwrites the just-gotten echo_time with
echo_train_length, and should have read read:

    gi_ptr->acq.echo_train_length =
        acr_find_double(group_list, ACR_Echo_train_length, -DBL_MAX);
/*added echo train length ilana*/

Ah... the dangers of cut-and-paste :)

I have fixed this and checked the fix into cvs. However, my guess is
that all minc files created with dcm2mnc since ilana's modification,
done in June this year, will have bad echo times. I suppose this only
affected the minc-2.0.14 release - Andrew?

-- Alex


More information about the MINC-users mailing list