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

make_ggseg3d_2_2_ggseg: error in evaluating the argument 'x' in selecting a method for function 'cellStats': subscript out of bounds #37

Open
johnaeanderson opened this issue Sep 9, 2021 · 1 comment

Comments

@johnaeanderson
Copy link

Hi Dr. Mowinckel,

I've tried to convert the 3D ICBM atlas to 2D using the code below. I've run into a few errors I'm not sure how to debug (but am hoping you have a better idea of what they mean).

Just to make sure the example works, I also ran test <- make_ggseg3d_2_ggseg() which uses the dk by default - this seems to work & I was able to plot the results just fine.

I'd appreciate any insight,

Best wishes,

John

make_ggseg3d_2_ggseg( ggseg3d_atlas = icbm_3d, steps = 1:7, output_dir = "/Users/john/Desktop/icbm", tolerance = 0, smoothness = 5, cleanup = FALSE, ncores = parallel::detectCores() - 2 ) • 1/7 Snapshotting views of entire atlas to /Users/john/Desktop/icbm/icbm ✓ Snapshots complete • 2/7 Snapshotting individual regions to /Users/john/Desktop/icbm/icbm/img ✓ Region snapshots complete • 3/7 Isolating regions to /Users/john/Desktop/icbm/icbm/masks • & writing masks to /Users/john/Desktop/icbm/icbm/regions ✓ isolation complete • 4/7 Extracting contours from regions Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'cellStats': subscript out of bounds In addition: Warning messages: 1: In mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, : all scheduled cores encountered errors in user code 2: In mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, : all scheduled cores encountered errors in user code

@drmowinckels
Copy link
Contributor

Hi!

Sorry for the late response. The ICBM is a subcortical atlas, and as such cannot be created into 2d from the 3d-atlas. Only the cortical atlases can do this (because they are inflated). To create the ICBM in 2d, you will need to use the make_volumetric_ggseg()

Here is some information about using that function. You will need the original ICBM atlas file to make this work.
https://ggseg.github.io/ggsegExtra/articles/createaseg.html

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