ggseg / ggsegExtra

Repository for extra atlases for the ggseg-package
https://ggseg.github.io/ggsegExtra/
Other
47 stars 17 forks source link

make_volumetric_2_3datlas /// 1:dim(plys)[2] : argument of length 0 #34

Open evancollins1 opened 3 years ago

evancollins1 commented 3 years ago

I have a custom atlas with 600+ parcels.

I am trying to import this atlas to use in ggseg3d.

I used FreeSurfer to convert the atlas object map .nii file to .mgz using the command mri_vol2surf.

I then ran the following function:

dt <- make_volumetric_2_3datlas(subject = "fsaverage", template = "Fixed_TwoSidedAtlasObject_Jul112021_RH.mgz", color_lut = NULL)

which produced the error: Error in 1:dim(plys)[2] : argument of length 0

It does not seem to be able to extract PLY from the .mgz file.

Do you have any suggestions on how to fix this? Would you recommend another route to make this custom atlas compatible with ggseg3d?

(Note: I followed the steps outlined in the bottom half of this page (https://ggseg.github.io/ggsegExtra/articles/customatlas3d.html), but I used the make_volumetric_2_3datlas function instead of the make_aparc_2_3datlas function, as the input arguments shown on the webpage match the former rather than the latter.)

xasapakos commented 3 years ago

Same problem here when trying to use another atlas. Have you found a solution? /K

drmowinckels commented 3 years ago

Hi.

Sorry for the late initial response. First question from my part, you are sure the template is registered to fsaverage before starting?

second, could you give it a go re-registering to fsaverage5 and see how you get along with that? I've had some more bugs using other surfaces than fsaverage5, without really knowing exactly why.

Thirdly, if its a pure cortical atlas, I would stick to make_aparc_to_ggseg3d as its best suited for that. If it is a combination of cortical and subcortical structures in the atlas, the volumetric version is the only that can work.

xasapakos commented 3 years ago

Hi,

Thanks for your reply. I tried a couple of times but I did not manage to make it work and I still get the "Error in 1:dim(plys)[2] : argument of length 0" after many hours of processing. Here is what I did

My steps are the following:

  1. mri_vol2vol --reg /Applications/freesurfer/7.1.0/average/mni152.register.dat --mov Example.nii --targ /Applications/freesurfer/7.1.0/subjects/fsaverage5/mri/orig.mgz --o Example.mgz
  2. dt <- make_volumetric_2_3datlas(template = "Example.mgz", color_lut = NULL)

Maybe I am doing something wrong with the co-registration. I tried with an atlas that has cortical and subcortical VOIs and then only cortical VOIs. Same error both times.

drmowinckels commented 2 years ago

Ok.

@xasapakos a thing you can test is if you can manage to create something from an atlas that is already there. That should give us an idea if the conversion to fsaverage5 is the issue, or if there is something in the package that is not working as expected.

Try following the tutorial for creating the aseg atlas: https://ggseg.github.io/ggsegExtra/articles/createaseg.html

drmowinckels commented 2 years ago

I found a small bug yesterday, that I pushed a fix for today. Want to give it another go and see if it fixes it? Since I cant get the same error here, I have no idea if it will help or not.

baogongtou754 commented 7 months ago

I’ve also met this error. Have you settled it? Thanks.

Error in 1:dim(plys)[2] : argument of length 0

drmowinckels commented 7 months ago

Hey @baogongtou754 .

How recent is you version of ggseg?

baogongtou754 commented 7 months ago

Hey @baogongtou754 .

How recent is you version of ggseg?

I've installed it according to this page. https://ggseg.github.io/ggsegExtra/articles/createaseg.html

drmowinckels commented 7 months ago

the ggsegExtra package you installed quite recently, right? Like within the last 2 months? Just trying to pinpoint if the error is not fixed by the fix I deployed in October or not :)

If not, then I will look into at my earliest conveniece (which I'm afraid is going to be a couple of weeks :( )

baogongtou754 commented 7 months ago

yes, it's the quite reccent ggsegExtra package. Looking for your fix. I think ggsegExtra is a smart software for my research. waiting for you