Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
llevitis opened this issue Oct 11, 2024 · 1 comment
Open

Comments

@llevitis
Copy link

llevitis commented Oct 11, 2024

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!!

@llevitis llevitis changed the title AtlasTrack atlas almost done, need help with slice visualization ggsegAtlasTrack almost done, need help with shifting slices around Oct 11, 2024
@drmowinckels
Copy link
Contributor

Hi! I'm checking in just to say I'm sorry for not following up. I am on long-term sick leave and am not able to deal with maintenance at this point. I will follow up as soon as I am able, and hope someone else might be able to help in the mean time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants