[MINC-users] mincresample along a dimension with *-width variables

Alex Zijdenbos zijdenbos at gmail.com
Thu Feb 6 15:00:30 EST 2014


In my conceptual understanding, the -width attributes allow you to separate
the "thickness" from the sample step size. Indeed most commonly used along
a time dimension; but I could imagine an image volume being a stack of 3mm
thick slices with a slice gap of 1mm; making the step size 4mm (a lot of
MRI data used to be acquired like that). But I doubt that in reality this
is used much, and I have no idea whether something like mincresample
actually uses this information during resampling (I suspect not) - but it
seems to me that it shouldn't break, either.

-- A


On Thu, Feb 6, 2014 at 1:17 PM, Andrew Wood <andrew at biospective.com> wrote:

> Are they ever used for spatial dimensions? It was actually a mistake that
> it ended up in my affected volumes.
>
>
> On Thu, Feb 6, 2014 at 12:31 PM, Vladimir S. FONOV <
> vladimir.fonov at gmail.com
> > wrote:
>
> > I've seen them used in dynamic acquisition where they are used with
> > time dimension, for example in PET data
> >
> > On Thu, Feb 6, 2014 at 12:25 PM, Andrew Wood <andrew at biospective.com>
> > wrote:
> > > HI All,
> > >
> > > I ran into a issue when resampling a volume along a dimension which has
> > > *-width attribute values. It seems that such a dimension can't be
> > resampled
> > > to have a different number of elements.
> > >
> > > An example input volume:
> > > $ mincinfo in.mnc
> > > file: in.mnc
> > > image: signed__ short -32768 to 32767
> > > image dimensions: zspace yspace xspace
> > >     dimension name         length         step        start
> > >     --------------         ------         ----        -----
> > >     zspace                     47        3.375     -1027.16
> > >     yspace                    128     -2.65336      363.575
> > >     xspace                    128     -2.65336      171.012
> > >
> > > $ mincheader in.mnc | grep zspace-width
> > >         double zspace-width(zspace) ;
> > >                 zspace-width:dimorder = "zspace" ;
> > >                 zspace-width:varid = "MINC standard variable" ;
> > >                 zspace-width:vartype = "dim-width____" ;
> > >                 zspace-width:version = "MINC Version    1.0" ;
> > >                 zspace-width:filtertype = "square____" ;
> > >                 zspace-width:spacing = "regular__" ;
> > >                 zspace-width:width = -3.375 ;
> > >  zspace-width = -3.375, -3.375, -3.375, -3.375, -3.375, -3.375, -3.375,
> > >
> > > Now, add a voxel to each dimension:
> > > $ mincresample -clobber in.mnc out.mnc -nelements 129 129 48
> > > (from miattputstr): Function 'dimrename' not implemented
> > >
> > > $ mincinfo out.mnc
> > > file: out.mnc
> > > image: signed__ short -32768 to 32767
> > > image dimensions: zspace yspace xspace
> > >     dimension name         length         step        start
> > >     --------------         ------         ----        -----
> > >     zspace                     47        3.375     -1027.16
> > >     yspace                    129     -2.65336      363.575
> > >     xspace                    129     -2.65336      171.012
> > >
> > >
> > > I dug around the mincresample source code, and the the first thing done
> > > when creating the output volume is a copy of all variable definitions
> > from
> > > the input, excluding {x,y,z}space, image, and image-{min,max}. It
> appears
> > > that copying the zspace-width actually forces zspace to be copied,
> > > resulting in a naming conflict between the original zspace and our new
> > > zspace. To work around this, it tries to rename the copied zspace to
> > > zspace0, which is where we see the "Function 'dimrename' not
> implemented"
> > > error message. The result is being stuck with the size of the original
> > > zspace.
> > >
> > > The problem goes away if {x,y,z}space-width is added to the exclusion
> > list
> > > for the original variable copy operation. I'm having trouble imagining
> > when
> > > those *-width variables are used though, so I'm not sure if this'd be a
> > > sane fix.
> > >
> > > Does anyone have any thoughts that might clear up this situation?
> > >
> > > Thanks,
> > > Andrew
> > > _______________________________________________
> > > MINC-users at bic.mni.mcgill.ca
> > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
> >
> >
> > --
> > Best regards,
> >
> >  Vladimir S. Fonov ~ vladimir <dot> fonov <at> gmail <dot> com
> > _______________________________________________
> > 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