[MINC-users] mincreshape problem
Vladimir S. FONOV
vladimir.fonov at gmail.com
Sun Dec 16 16:16:39 EST 2012
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
More information about the MINC-users
mailing list