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

Crop out empty areas in custom created aseg atlas #41

Open
shinhm91 opened this issue Nov 26, 2021 · 1 comment
Open

Crop out empty areas in custom created aseg atlas #41

shinhm91 opened this issue Nov 26, 2021 · 1 comment

Comments

@shinhm91
Copy link

Hello,

First, thank you for creating this helpful package. I was able to utilize this package to create a nice visual representation of my data.

I was just wondering if ggseg() or ggplot()+geom_brain() functions had an option to set axis limits in the plot area like xlim() or x_scale_continuous() does. For my customized subcortical plot, axial and coronal view plots have a large empty area that I would like to remove but I wasn't able to do so using xlim() or other axis limiting functions.

Below is an example of my subcortical plot with coronal view. I would like to remove empty areas by only showing where coronal map is and not show x coordinates from 400 until 600 where it is empty.

coronal-aseg-crop

@drmowinckels
Copy link
Contributor

Hi!

Thanks for using our pakcage and I'm so pleased to see your atlas creation is working!

This is acutally not empty space, if you notice, there is a little spec around x = 550 y = 0. That is what making the grid around the remaining to large. We will need to remove it.
You can do directly into the SF object and try to locate it to remove it, but that cat be tricky.

The volumetric creation pipeline has ar argument called vertex_size_limits which by default is set to c(3*10^6, 3*10^7). By adjusting these values, you should be able to remove vertices that are super small. This would likely need some trial and error to find the correct value, but you will only need to run the pipeline from step 5 and onwards (i.e. setting steps = 5:8 ).

I hope this will help you get the atlas you are looking for.

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