[MINC-users] mincresample of negative zsteps

Soren Christensen sorench at gmail.com
Mon Nov 1 23:48:15 EDT 2010


Hi Andrew,
 Sorry, have been away for a while and just trying to look into this now.

Yes the files have cosines - and as far as I can tell non-suspicious looking
too:
mincheader template.mnc  | grep cos
        zspace:direction_cosines = -0., -0., 1. ;
        yspace:direction_cosines = -0., 1., -0. ;
        xspace:direction_cosines = 1., -0., -0. ;
mincheader to_be_resampled.mnc  | grep cos
        zspace:direction_cosines = -0., -0., 1. ;
        yspace:direction_cosines = -0., 1., -0. ;
        xspace:direction_cosines = 1., -0., -0. ;


I am not sure where the problem arises (is it that zspace is my slowest
varying dim and the -1 you allude to?)

In any case, I can work around it by reshaping to positive zsteps:
mincreshape -dimsize zspace=-1 +zdirection -clobber template.mnc
new_template.mnc

Using new_template.mnc as target solves it. So it seems the problem has to
do with the "likefile" in mincresample having negative zsteps.

Thanks for the suggestions!

Cheers
Soren



On Wed, Oct 20, 2010 at 4:02 PM, Andrew Janke <a.janke at gmail.com> wrote:

> Hi Soren,
>
> On Sat, Oct 16, 2010 at 13:10, Soren Christensen <sorench at gmail.com>
> wrote:
> >  I have trouble understanding why I get a positive zstep when
> > resampling like a file with a negative zstep:
> >
> > The effect of this seems to be that the resampling is done outside of
> > the volume of to_be_resampled.mnc and I get an empty image as result.
> >
> > Can anyone see what is happening?
>
> As of right now no. My initial guess is you are being bitten by the
> non-image dimension behavior. (search for -1 in man mincreshape) but I
> am not sure if this is the case.
>
> Do the files have direction cosines?
>
> a
> _______________________________________________
> 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