Skip to content

ggsegAtlasTrack almost done, need help with shifting slices around #65

@llevitis

Description

@llevitis

Hi! Thank you so much for all your work on the ggseg and ggsegExtra repos @drmowinckels ! I have gone through the tutorials for creating a new subcortical atlas, and I basically have it working for the AtlasTrack white matter atlas. What I'm having some trouble with and truly can't figure out is purely an aesthetic issue. With the figure below, is there any way to reposition the slices the way they are organized for the JHU or Tracula white matter atlases where it's the axial slice, coronal slice, and second axial slice without any gapping. Here's what I have:

image

Here's the code I tried:

library(ggsegExtra)
library(ggseg)
library(tidyverse)


slices <- data.frame(x = c(139, 87, 129), 
           y = c(117,100, 134), 
           z = c(111,94, 144),
           view = c("axial","coronal","axial"),
           stringsAsFactors = FALSE)
# make atlas ----
atlastrack <- make_volumetric_ggseg(subject = "fsaverage5",
                                    steps = 1:8, 
                                    slices = slices,
                                    skip_existing = FALSE,
                                    vertex_size_limits = NULL,
                                    output_dir = "/Users/levitise2/data/AtlasTrack",
                                    color_lut = "/Users/levitise2/data/AtlasTrack/atlastrackWithCortex-freesurfer-lut-renumbered.txt",
                                    label_file = "/Users/levitise2/data/AtlasTrack/fiber_atlas/atlastrackWithCortex_fsaverage5.mgz")

atlastrack$data <- filter(atlastrack$data, 
                     !grepl("Unknown", label, ignore.case = TRUE),
                     !grepl("White-matter", label, ignore.case = TRUE)
) %>% 
  mutate(region = ifelse(grepl("cortex", region), NA, region))

If I try to use the facet grid approach with ggplot to project statistical values onto the tracts, it just looks a bit ugly:

image

I would really appreciate any help with this!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions