-
Notifications
You must be signed in to change notification settings - Fork 13
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
Tight layout with 9 view inflated #50
Comments
This definitely should not happen. I will try to reproduce locally and let you know. Which environment and version of fsbrain are you using? Environment:
|
Okay, I can reproduce this locally with the latest official release version of fsbrain. Confirmed as a bug. I will look into it. |
Hi Tim, Thank you for looking into it. Not sure if this information is still helpful, but it was present on both my work and home desktop. Home (not sure of specifics right now but its fairly recent reinstall of windows so everything is newer updates) Thank you, |
Thanks for the additional info! |
Hi Matthew (@mattsodoma), I have rolled out a fix for this on the master branch. The fix is not yet on CRAN, but it will go there with the next fsbrain release. To use the fixed version, you will have to install via install.packages("remotes")
remotes::install_github("dfsp-spirit/fsbrain") IMPORTANT: If you did this in a session that already had fsbrain loaded, you will have to completely restart R. Clicking Then you can try this: fsbrain::download_optional_data();
fsbrain::download_fsaverage(accept_freesurfer_license = TRUE);
subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
subject_id = 'fsaverage';
lh_demo_cluster_file = system.file("extdata", "lh.clusters_fsaverage.mgz", package = "fsbrain", mustWork = TRUE);
rh_demo_cluster_file = system.file("extdata", "rh.clusters_fsaverage.mgz", package = "fsbrain", mustWork = TRUE);
lh_clust = freesurferformats::read.fs.morph(lh_demo_cluster_file); # contains a single positive cluster (activation, group difference), the other values are 0
rh_clust = freesurferformats::read.fs.morph(rh_demo_cluster_file); # contains two negative clusters
cm = fsbrain::vis.symmetric.data.on.subject(subjects_dir, subject_id, lh_clust, rh_clust, surface="inflated", bg="curv_light", rglactions = list('shift_hemis_apart'=TRUE), views = NULL);
fsbrain::export(cm, img_only = TRUE, output_img = "fsbrain_issue50_export.png", rglactions = list('shift_hemis_apart'=TRUE), view_angles=fsbrain::get.view.angle.names(angle_set = "t9"), colorbar_legend= "issue50 test"); |
Please let me know whether this fixes your problem. |
Hi Tim, |
Great to hear to that! |
I am trying to get a tight layout with the inflated brain on the 9 view. I was reading the FAQ which pointed me to use vislayout.from.coloredmeshes and to use shift_hemis_apart so the hemispheres on inflated don't overlap. My issue, is that when I use export, it recognizes the rglaction correctly and the hemispheres are seperated. However, when I use vislayout.from.coloredmeshes it does not separate the hemispheres. On the other hand, when I use the vislayout.from.coloredmeshes, I get the type of spacing that I would like whereas export has a lot of white space. Wondering if I am doing something wrong in my vislayout call or export calls. Pictures and code below:
Export image:
vislayout.from.coloredmeshes image
code:
`x<-vis.symmetric.data.on.subject(subjects_dir, subject_id, lh_clust, rh_clust, bg="curv", surface = "inflated", rglactions = list('shift_hemis_apart'=TRUE), views = NULL)
export(x, img_only = TRUE, output_img = output_saveinflated,rglactions = list('shift_hemis_apart'=TRUE),view_angles=c("t9"),colorbar_legend= legendname)
vislayout.from.coloredmeshes(x,output_img = output_saveinflated2, view_angles = get.view.angle.names(angle_set = "t9"),rglactions = list('shift_hemis_apart'=TRUE))`
The text was updated successfully, but these errors were encountered: