[MINC-users] mincreshape -dimsize

Robert D. Vincent robert.d.vincent at mcgill.ca
Mon Sep 21 11:41:27 EDT 2015


Hi Soren,

Historically, I believe mincreshape really was only meant to resize the two
fastest-varying dimensions (xspace and yspace in this case), at least
according to the man page. However, I'm not sure whether there was some
attempt over the years to make it more flexible, but evidently it is
failing pretty clumsily. It certainly shouldn't issue the errors you are
seeing. I'll look into it.

    -bert

On Sun, Sep 20, 2015 at 11:45 PM, Soren Christensen <sorench at gmail.com>
wrote:

> Thanks Andrew!
>  Yes file is MINC2 and it was exactly your 2nd point I failed toremember in
> detail.
> It actually does not seem to do the trick - the image comes out without a
> zspace dimension if I add this option.
> I used mincresample instead, and using the desired -zsize and -zstep with
> no other options achieved the re-slicing I was looking for.
> Let me know if you want me to do something to document the mincreshape
> issue
>
> Thanks!
> Soren
>
> On Sun, Sep 20, 2015 at 4:41 PM, Andrew Janke <a.janke at gmail.com> wrote:
>
> > Hi Soren,
> >
> > This could be one of two things.
> >
> > 1. Is this a MINC1 or MINC2 file? If the former, convert to MINC2
> > first using mincconvert
> >
> > 2. I think what you are alluding to is "-dimrange zspace=-1" option
> > that will tell mincreshape to treat a slice dimension as an image
> > dimension.
> >
> > There has been a feature request kicking about for a long time to
> > remove this behaviour as it doesn't make as much sense as it used to
> > when Peter first implemented slice scaling in MINC1 but I don't think
> > it's made it into the latest release as of yet.
> >
> >
> > a
> >
> >
> >
> > On 20 September 2015 at 13:48, Soren Christensen <sorench at gmail.com>
> > wrote:
> > > Hi,
> > >  I have an issue with mincreshape I don't understand. I guess it has to
> > do
> > > with trying to interpolate the slowest varying dimension:
> > >
> > > file: pwi_bl.mnc
> > > image: signed__ float 0 to 1381.4969482421875
> > > image dimensions: zspace yspace xspace
> > >     dimension name         length         step        start
> > >     --------------         ------         ----        -----
> > >     zspace                     17            5      -38.912
> > >     yspace                    128        -1.75      95.0638
> > >     xspace                    128        -1.75      110.338
> > >
> > > u at K450$ mincreshape -dimsize zspace=49 -float -clobber  pwi_bl.mnc
> > > pwi_blIP.mnc
> > > Copying chunks:HDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread
> > 0:
> > >   #000: H5Dio.c line 161 in H5Dread(): selection+offset not within
> extent
> > >     major: Dataspace
> > >     minor: Out of range
> > > (from mivarget): Can't read dataset /minc-2.0/image/0/image-min
> > > (from mivarget): Can't read variable ID# 1
> > > HDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:
> > >   #000: H5Dio.c line 161 in H5Dread(): selection+offset not within
> extent
> > >     major: Dataspace
> > >     minor: Out of range
> > > (from mivarget): Can't read dataset /minc-2.0/image/0/image-max
> > > (from mivarget): Can't read variable ID# 2
> > > .................................................Done.
> > >
> > > The file is written but it appears incorrect with a larger Z FOV for
> > > starters but it also look as if the extreme slices are simply copied
> > > outwards at each end (sorry cannot post images here). Finally the image
> > > appears corrupted in register and freezes up Display and the OS!
> > >
> > > file: pwi_blIP.mnc
> > > image: signed__ float 0 to 1381.4969482421875
> > > image dimensions: zspace yspace xspace
> > >     dimension name         length         step        start
> > >     --------------         ------         ----        -----
> > >     zspace                     49          2.5      -57.662
> > >     yspace                    128        -1.75      95.0638
> > >     xspace                    128        -1.75      110.338
> > >
> > > -dimsize xspace=64 works without errors.
> > >
> > > I have a vague recollection Andrew Janke once explained how to deal
> with
> > > this but I am unable to locate that post (if it ever existed).
> > >
> > > Thanks!
> > > Soren
> > > _______________________________________________
> > > MINC-users at bic.mni.mcgill.ca
> > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
> _______________________________________________
> 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