Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
22 stars 17 forks source link

Feature request: Allow plotting tools to determine begin/end from bounding box of mask #248

Closed gdevenyi closed 5 years ago

gdevenyi commented 5 years ago

Currently to quickly tune begin and end for mincplotliceseries I use mincbbox -minccrop which gives me start and ending limits. It would be nice if the plot tools could do this natively.

There's probably an R-way to do this by loading the mask and such but I still don't think that way...

jasonlerch commented 5 years ago

Good idea - but also more sensible for MRIcrotome if being incorporated with visualization.


This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

gdevenyi commented 5 years ago

For posterity:

xmin <- min(which(averagemask == 1, arr.ind=TRUE)[,"dim1"])
xmax <-max(which(averagemask == 1, arr.ind=TRUE)[,"dim1"])
ymin <- min(which(averagemask == 1, arr.ind=TRUE)[,"dim2"])
ymax <- max(which(averagemask == 1, arr.ind=TRUE)[,"dim2"])
zmin <- min(which(averagemask == 1, arr.ind=TRUE)[,"dim3"])
zmax <- max(which(averagemask == 1, arr.ind=TRUE)[,"dim3"])