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

Error: Folder does not exist error: recon-all-t1.sh #19

Closed
teffalump opened this issue Apr 26, 2024 · 6 comments
Closed

Error: Folder does not exist error: recon-all-t1.sh #19

teffalump opened this issue Apr 26, 2024 · 6 comments
Assignees

Comments

@teffalump
Copy link

When I try to run the recon-all-t1.sh shell script it has an error for the line below as that folder that does not exist. I believe I have tracked it to these lines

At the end of the shell script

# Removing temporary fs root
rm -r "$wdir_fs"
# Copy raw MRI to FreeSurfer folder so 3D viewer can recognize it
cp -f "$mri_path" "$SUBJECTS_DIR/fs/mri/rave_slices$mri_ext"

SUBJECTS_DIR is

SUBJECTS_DIR="$wdir_fs/rave-imaging"

wdir_fs is in the .cache path, on my computer is expanded to ~/.cache/R/raveio/FreeSurfer/<subject id> and it is deleted by the rm command preceding cp and consequently SUBJECTS_DIR (~/.cache/R/raveio/FreeSurfer/<subject id>/rave-imaging) does not exist which caused the No such file or directory

I believe SUBJECTS_DIR should be exchanged for $wdir_actual/rave-imaging or equivalent, similar to:

cp -f "$wdir_actual/rave-imaging/ants/mri/brain.finalsurfs.nii.gz" "$wdir_actual/rave-imaging/fs/mri/rave_slices.nii.gz"

@dipterix dipterix self-assigned this May 1, 2024
@dipterix
Copy link
Collaborator

dipterix commented May 1, 2024

Yes, this is a typo+bug that existed for a while. Basically RAVE uses the brain.finalsurfs.mgz as underlay by default. RAVE allows you to set custom underlay by putting rave_slices.??? under the mri folder, provided that this file sits under the same coordinates as the T1 image.

I was trying to copy the raw T1 here and name it rave_slices. This operation is optional (part of reasons why I didn't fix it). Also, the T1 images are sometime too dark, or the contrast is too low. I'm currently working on the 3D viewer so you can adjust the brightness and contrast on the fly. Also I have recently release a new pipeline (with non-linear normalization to template MNI152) that does the brain masking and intensity correction without FreeSurfer.

Maybe it would be a good chance for me to come back and fix this after the dynamical contrast & brightness adjustment. Please let me know if this is urgent to you and I can prioritize.

@dipterix
Copy link
Collaborator

dipterix commented May 1, 2024

Also we have a slack channel for RAVE and YAEL for more interactive Q&A. Please let me know if you would like to join or send your edu email to slack at rave.wiki. Thanks for reporting this issue : )

dipterix added a commit that referenced this issue May 3, 2024
@dipterix
Copy link
Collaborator

dipterix commented May 3, 2024

I fixed this problem. Could you update RAVE and retry? @teffalump

@teffalump
Copy link
Author

Hi, sorry for delay. I'll try the updated code soon.

@dipterix
Copy link
Collaborator

Not a hurry at all. Thanks for posting this issue : )

@teffalump
Copy link
Author

Just ran it on a new sEEG patient and works. Thanks.

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