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

Vladimir S. FONOV vladimir.fonov at gmail.com
Thu Feb 6 12:31:49 EST 2014


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


More information about the MINC-users mailing list