Open gdevenyi opened 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"])
Good idea, although do you think we might want to add a few voxels for padding?
yeah 10v is my default padding, though it might make sense to scale that for voxel size in some way
Transferring from RMINC since it will eventually use MRIcrotome under the hood: https://github.com/Mouse-Imaging-Centre/RMINC/issues/248