Mouse-Imaging-Centre / MRIcrotome

R package for MRI data visualization
3 stars 1 forks source link

error overlaying label file onto template using sliceSeries #19

Open tulste opened 4 years ago

tulste commented 4 years ago

Trying to use sliceSeries as a way to view labels on a template and I'm getting the following error message:

Error in dim(slice) <- dims : dims [product 41004] do not match the length of object [0]

used the following code:

anatVol <- mincArray(mincGetVolume(“secondlevel_template0.mnc”)) component1Labels <- mincArray(mincGetVolume(“new-coloured-labels/wholebrain-cluster-component1.mnc”))

sliceSeries(nrow = 5, ncol=5, dimension = 2, begin = 15, end = 165) %>% anatomy(anatVol, low=0.5, high=12.5) %>% overlay(component1Labels) %>% legend(“t-statistics”) %>% draw()

I checked that these files are in fact the same dimensions using mincinfo and using Display in minc to visualize. Moreover, the object created in the R environment show that they indeed have the same dimensions.

Thanks!

gdevenyi commented 4 years ago

Error is due to the defaults of overlay not handling the range of values well, overriding with low and high fixed it.