Skip to content

Commit

Permalink
Added default rave_slices in case users want to choose their own slic…
Browse files Browse the repository at this point in the history
…es in the 3D viewer
  • Loading branch information
dipterix committed Dec 5, 2023
1 parent a4cac58 commit 10524a4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/threeBrain.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,16 @@ threeBrain <- function(
if(!fs_path_exists) { return() }

# 3D slices MRI overlay + Norig + Torig
allowed_mri_prefix <- c("brain.finalsurfs", "synthSR.norm", "synthSR", "brain",
"brainmask", "brainmask.auto", "T1")
allowed_mri_prefix <- c(
"rave_slices",
"brain.finalsurfs", "synthSR.norm", "synthSR", "brain",
"brainmask", "brainmask.auto", "T1"
)

path_mri <- file.path(fs_path, "mri", as.vector(rbind(
sprintf("%s.mgz", allowed_mri_prefix),
sprintf("%s.nii.gz", allowed_mri_prefix),
sprintf("%s.nii", allowed_mri_prefix)
sprintf("%s.nii", allowed_mri_prefix),
sprintf("%s.mgz", allowed_mri_prefix)
)))
path_mri <- path_mri[file.exists(path_mri)]
if(length(path_mri)){ path_mri <- path_mri[[1]] }
Expand Down

0 comments on commit 10524a4

Please sign in to comment.