[MINC-users] mincreshape problem

Soren Christensen sorench at gmail.com
Mon Dec 17 12:05:26 EST 2012


Thanks - it is a bit of a mystery. Both a.mnc and b.mnc are minc1 files.
b.mnc written by MIPAV, a.mnc by dcm2mnc.  Problem was the guy who created
the files loaded the DICOMs directly into MIPAV and then saved the ROI with
the MIPAV generated header (which apparently deviates from what dcm2mnc
does).
Both minc1 files have min and max defined (per-slice), but mincresample
writes MINC2 and for some reason this file gives the out-of range messages.
In the interest of time I am going to use minctoraw->rawtominc and simply
use a.mnc as -like option. That seems to work well.


Soren




On Sun, Dec 16, 2012 at 1:16 PM, Vladimir S. FONOV <vladimir.fonov at gmail.com
> wrote:

> Hello,
>
>
> it looks like this minc file from MIPAV doesn't have variable image-min
> defined, i.e if you do h5ls -r on a well-defined minc2 file it will show
> you something like that:
>
> /                        Group
> /minc-2.0                Group
> /minc-2.0/dimensions     Group
> /minc-2.0/dimensions/xspace Dataset {SCALAR}
> /minc-2.0/dimensions/yspace Dataset {SCALAR}
> /minc-2.0/dimensions/zspace Dataset {SCALAR}
> /minc-2.0/image          Group
> /minc-2.0/image/0        Group
> /minc-2.0/image/0/image  Dataset {193, 229, 193}
> /minc-2.0/image/0/image-max Dataset {193}
> /minc-2.0/image/0/image-min Dataset {193}
> … etc …
>
> so, you file probably have /minc-2.0/image/0/image-min bit missing…
> which is needed to correctly interpret the intensity information in the
> file.
>
>
> On 2012-12-14, at 8:27 PM, Soren Christensen <sorench at gmail.com> wrote:
>
> > Hi,
> > I am trying to fix up some MINC files that were written by MIPAV, for
> some
> > reason some of these files have extra slices and displacement of the ROI.
> > In plane resolution is the same.
> > What I am stuck with is the followoing mincresample behaviour:
> >
> > file: a.mnc
> > image: signed__ short -32768 to 32767
> > image dimensions: zspace yspace xspace
> >    dimension name         length         step        start
> >    --------------         ------         ----        -----
> >    zspace                     26            5     -77.0989
> >    yspace                    256      -0.9375      128.406
> >    xspace                    256      -0.9375      121.591
> >
> >
> > file: b.mnc
> > image: signed__ short -32767 to 32767
> > image dimensions: zspace yspace xspace
> >    dimension name         length         step        start
> >    --------------         ------         ----        -----
> >    zspace                     27            5     -77.0989
> >    yspace                    256      -0.9375      128.406
> >    xspace                    256      -0.9375      121.591
> >
> >
> > So file a has one slice less than b, but spatial info match. So I'd like
> to
> > resample b.mnc like a, in the hope that the top slice is irrelevant ()
> >
> > mincresample -like a.mnc b.mnc b_likea.mnc
> > (from miattputstr): Function 'dimrename' not implemented
> > Transforming slices:..........................Done
> >
> > #> mincinfo a.mnc b_likea.mnc
> > file: a.mnc
> > image: signed__ short -32768 to 32767
> > image dimensions: zspace yspace xspace
> >    dimension name         length         step        start
> >    --------------         ------         ----        -----
> >    zspace                     26            5     -77.0989
> >    yspace                    256      -0.9375      128.406
> >    xspace                    256      -0.9375      121.591
> >
> >
> > file: b_likea.mnc
> > image: signed__ short -32767 to 32767
> > image dimensions: zspace yspace xspace
> >    dimension name         length         step        start
> >    --------------         ------         ----        -----
> >    zspace                     27            5     -77.0989
> >    yspace                    256      -0.9375      128.406
> >    xspace                    256      -0.9375      121.591
> >
> >
> > So b_likea.mnc is not what expect it to be (26 slices). The file seems
> > broken:
> >
> > Display b_likea.mnc
> > Input b_likea.mnc
> > HDF5-DIAG: Error detected in HDF5 (1.8.8) thread 0:
> >  #000: H5Dio.c line 153 in H5Dread(): selection+offset not within extent
> >    major: Dataspace
> >    minor: Out of range
> > (from miicv_attach): Can't read dataset /minc-2.0/image/0/image-min
> > (from miicv_attach): Can't read variable ID# 1
> > miicv_attach: MINC package entry point
> > HDF5-DIAG: Error detected in HDF5 (1.8.8) thread 0:
> >  #000: H5Dio.c line 153 in H5Dread(): selection+offset not within extent
> >    major: Dataspace
> >    minor: Out of range
> > (from miicv_attach): Can't read dataset /minc-2.0/image/0/image-min
> > (from miicv_attach): Can't read variable ID# 1
> > miicv_attach: MINC package entry point
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> > (from miicv_get): ICV is not attached
> >
> >
> > Any suggestions to what is happening herE?
> >
> > Soren
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
> ---
> Best regards,
>
> Vladimir S. FONOV ~ v.s.fonov <at> ilmarin.info
>
>
>
>
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list