Currently the plotting functions (mincPlotAnatAndStatsSlice) need an object with the correct spatial dimensions assigned. While this might in the future happen at the time those objects are created, for the moment this utility function works with older style RMINC objects and extract what you need.
mincArray(volume, dimIndex = 1)
volume | The input volume (from mincLm, mincGetVolume, etc.) |
---|---|
dimIndex | The index into a multidimensional object |
A matrix with 3 dimensions
R uses Fortran indexing, so dimension assignment is c(dim[3], dim[2], dim[1]) once dimensions are obtained from any libminc functions (which use C indexing)
# NOT RUN { vol <- mincGetVolume("somefile.mnc") volWithDims <- mincArray(vol) vs <- mincLm(jacobians ~ genotype, gf) tvol <- mincArray(vs, 6) # }