[MINC-users] dcm2mnc and (ir)regular spacing (again)

Peter Neelin peter.neelin at gmail.com
Wed Apr 18 09:41:00 EDT 2012


Hi Alex,

On Tue, Apr 17, 2012 at 5:10 PM, Alex Zijdenbos <zijdenbos at gmail.com> wrote:

> So time:spacing is listed as "irregular"; and looking at the time- and
> time-width vars the frame times are 300s apart (give or take).
> However, the time:step attribute is 225, not 300.
>
> Is this basically broken MINC?

Yes, it is broken. The step should be some form of average.

> I assume the time:step attribute
> somehow is generated from some DICOM field, but is basically wrong?

No, it is computed. The broken code is in dcm2mnc/minc_file.c, in
function minc_set_spacing(). It appears that the code is going down
the "if (regular)" branch and incorrectly computing the step by
summing the difference between coordinates for N-1 values, then
dividing by N (line 532). It then calls check_regular to see if it is
regular and finds that the (wrong) step value does not match the
coordinate spacing and marks the spacing as irregular.

Peter
-- 
Peter Neelin
(peter.neelin at gmail.com)


More information about the MINC-users mailing list