[MINC-users] Dimension data type

Robert D. Vincent bert at phalarope.com
Wed Mar 29 23:19:33 EDT 2017


Hi JP,

The long answer is that the type of the dimension variables does not
usually matter, because for a regularly sampled dimension, the dimension
variable's dataset is not used - only its attributes are meaningful. Many
of the MINC tools just create a scalar integer dataset for regular
dimensions.

The  notation yspace(yspace) indicates that the variable "yspace" is a
vector indexed by the dimension "yspace", which is what is expected for an
irregularly sampled dimension. In these dimensions the dimension dataset
stores a vector of sampling points. It has a floating-point type to allow
for real-valued sample points.

However, it sometimes happens that a regularly sampled dimension still has
this vector dataset stored - if you look at its values, it will probably
just be a vector of regular, monotonic values, something like : -4.2, -4.1,
-4.0, etc. in your case. It looks as though mincconcat is storing this
vector even though it is not needed.

So the short answer is: everything is probably working fine.

    -bert

On Wed, Mar 29, 2017 at 11:36 AM, Jean-Philippe Coutu <jp at biospective.com>
wrote:

> Dear MINC users,
>
> In the minc header, how does the data type of the dimension matter?
>
> For instance, one could start with a 2D slice with this for its yspace:
>
> int yspace ;
> yspace:length = 1 ;
> yspace:varid = "MINC standard variable" ;
> yspace:vartype = "dimension____" ;
> yspace:version = "MINC Version    1.0" ;
> yspace:comments = "Y increases from patient posterior to anterior" ;
> yspace:spacing = "regular__" ;
> yspace:alignment = "centre" ;
> yspace:start = -4.1 ;
> yspace:direction_cosines = 0., 1., 0. ;
> yspace:units = "mm" ;
> yspace:spacetype = "native____" ;
> yspace:step = 0.1 ;
>
> (both xspace and zspace are also int in this case, but with length >1)
>
> Now if one attempts to replicate this slice in the yspace dimension with
> this command:
>
> mincconcat -verbose -concat_dimension yspace -filestarts -0.1,0,0.1
> slice.mnc slice.mnc  slice.mnc out.mnc
>
> The mincheader of out.mnc will now display this:
>
> double yspace(yspace) ;
> yspace:length = 3 ;
> yspace:dimorder = "yspace" ;
> yspace:varid = "MINC standard variable" ;
> yspace:vartype = "dimension____" ;
> yspace:version = "MINC Version    1.0" ;
> yspace:comments = "Y increases from patient posterior to anterior" ;
> yspace:alignment = "centre" ;
> yspace:direction_cosines = 0., 1., 0. ;
> yspace:units = "mm" ;
> yspace:spacetype = "native____" ;
> yspace:spacing = "regular__" ;
> yspace:start = -4.2 ;
> yspace:step = 0.0999999999999999 ;
>
> So it went from int to double (both xspace and zspace remain int), and in
> addition, something weird happened where yspace became yspace(yspace).
>
> Now if one was to run something like mincreshape -normalize on either the
> slice.mnc or out.mnc, all xspace, yspace and zspace will now become double
> rather than int.
>
> Is this important for any minc operation? Can it be 'normalized' back to
> int somehow?
>
> Thanks,
> JP
> _______________________________________________
> 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