[MINC-users] Odd behaviour with recent versions of dcm2mnc/mincreshape

Alex Zijdenbos zijdenbos at gmail.com
Fri Jun 4 15:22:53 EDT 2021


Followup: we found a simpler way to demonstrate this issue:

$ make_phantom in.mnc && mincreshape in.mnc out.mnc && mincinfo -attvalue
xspace:spacing -attvalue yspace:spacing -attvalue zspace:spacing out.mnc
Copying
chunks:................................................................................................................................Done.
zspace
zspace
zspace

Massina Yahia will also pull-request a fix for this in the near future.

Have a good weekend! :-)

-- Alex

On Mon, May 31, 2021 at 11:30 PM Alex Zijdenbos <zijdenbos at gmail.com> wrote:

> Hi all,
>
> Stumbled into something rather strange:
>
> $ dcm2mnc DICOM/ADNI_126_S_0709_MR_IR-FSPGR-Repeat MINC_dcm2mnc_2.3.01
> $ mincheader MINC_dcm2mnc_2.3.01/*/*mnc | grep spacing
> xspace:spacing = "regular__" ;
> yspace:spacing = "regular__" ;
> zspace:spacing = "regular__" ;
> $ mincreshape MINC_dcm2mnc_2.3.01/*/*mnc MINC_dcm2mnc_2.3.01/reshaped.mnc
> $ mincheader MINC_dcm2mnc_2.3.01/reshaped.mnc | grep spacing
> xspace:spacing = "yspace" ;
> yspace:spacing = "yspace" ;
> zspace:spacing = "yspace" ;
>
> In other words, the <dim>:spacing attribute gets mangled by what *should*
> be a no-op. This is using:
> $ dcm2mnc -version
> program: 2.3.01 built Dec 10 2020 01:01:35
> libminc: 2.4.03
> netcdf : 4.5.0 of Jun 26 2018 10:58:21 $
> HDF5   : 1.8.20
>
> If I do the exact same thing with this older version:
> $ dcm2mnc -version
> program: 2.0.07 built Mar 19 2014 16:54:51
> libminc: 2.2.00
> netcdf : 3.6.1 of Mar 19 2014 16:53:18 $
> HDF5   : 1.8.9
>
> All seems to work as expected (all :spacing attributes remain
> "regular__"). Doing a quick comparison of the headers of the MINC volumes
> generated by these two versions of dcm2mnc, a few differences appear:
> $ diff <( mincheader MINC_dcm2mnc_2.0.07/*/*.mnc | grep spac | sort) <(
> mincheader MINC_dcm2mnc_2.3.01/*/*.mnc | grep spac | sort)
> 3c3
> < double xspace(xspace) ;
> ---
> > double xspace ;
> 10d9
> <  xspace = -100.899, -99.6994, -98.4994, -97.2994, -96.0994, -94.8994,
> 11a11
> >  xspace = 97.1005 ;
> 14d13
> < xspace:dimorder = "xspace" ;
>
> Further, if I use the "new" mincreshape on the "old" volume or vice versa,
> the spacing attributes remain "regular__". It's only the combination of
> both "new" dcm2mnc and "new" mincreshape that results in this.
>
> Unfortunately I can't actually distribute the source data, but it is ADNI
> data, and this is not an isolated case - this pretty much happens on most
> volumes that I pick up.
>
> Anybody any idea what we might be looking at here?
>
> Thanks,
>
> -- A
>


More information about the MINC-users mailing list