Closed aritban1github closed 5 days ago
Hi, there are a few things.
First, I would recommend to ask the FreeSurfer mailing list on how to run their tools which we cannot support here. For that I would recommend you run FreeSurfer recon-all on your data and then on top of that the Thalamic sub-segmentation. They should be able to help you get that working. Once it does you can replace the slow recon-all step with FastSurfer.
Second, probably the Thalamic sub-segmentation in FreeSurfer needs results from the surfaces. Please post your command that you use to run FastSurfer, it looks like you only run the segmentation module (--seg_only). This will probably not be sufficient (but I don't know for sure). In that case you should try to run the full FastSurfer pipeline, which will also create surfaces.
So about your questions:
Actually it could be that only the segmentation and the norm.mgz are needed (which are basically available). Let us know once you know what the exact input files are. Instead of the norm.mgz you could try the orig_nu.mgz (or a masked version of that, the mask is also there) and for the aseg, you can take the aseg.auto_noCCseg.mgz . If they also need the Corpus Callosum labels, then you would need to run until that is available but can skip the time consuming surfaces. If that turns out to be sufficient, we could create a special flag for stopping there in a future release. We are planing to move the CC seg into the segmentation block anyway (currently it is in the surface block) with a new deep learning tool in one of the future releases.
Closing this due to inactivity for now. We had tested this before and it worked, so it is most likely a problem with the specific setup that you have.
Hello Dr. Reuter,
Apologies for the delayed reply. I was able to resolve the issue. The entire problem stemmed from running the shorter FastSurfer pipeline initially instead of the longer FastSurfer pipeline, followed by the FreeSurfer thalamic nuclei segmentation.
This is how the code should look like, I ran it using singularity -
singularity exec --nv \ --no-home \ -B /data:/data \ -B /output:/output \ -B /fs_license:/fs_license \ ~/bin/fastsurfer-gpu.sif \ /bin/bash -c "/bin/bash /fastsurfer/run_fastsurfer.sh \ --t1 /data/T1.nii.gz \ --sd /output \ --sid subjectX \ --fs_license /fs_license/license.txt \ --parallel"
segmentation singularity shell -B /data:/data \ -B /output:/output \ -B /fs_license:/fs_license \ --env FS_LICENSE=/fs_license/license.txt \ ~/bin/freesurfer_7.4.1_20231214.simg <<EOF
(you need to download curl -X GET https://neurocontainers.neurodesk.org/freesurfer_7.4.1_20231214.simg -O before)
export SUBJECTS_DIR=/output
cd /output/subjectX/mri
segmentThalamicNuclei.sh subjectX
exit EOF
Thank you so much for your help! FastSurfer is of great help to me.
On Wed, Nov 20, 2024 at 9:01 AM Martin Reuter @.***> wrote:
Closing this due to inactivity for now. We had tested this before and it worked, so it is most likely a problem with the specific setup that you have.
— Reply to this email directly, view it on GitHub https://github.com/Deep-MI/FastSurfer/issues/607#issuecomment-2488663882, or unsubscribe https://github.com/notifications/unsubscribe-auth/A24B665OB5IT74BD2QCKIPT2BSI4ZAVCNFSM6AAAAABRQVKC4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBYGY3DGOBYGI . You are receiving this because you authored the thread.Message ID: @.***>
Hello Fastsurfer community,
I am encountering persistent issues while trying to run thalamic nuclei segmentation using FreeSurfer 7.4.1 in a Singularity container after running FastSurfer. Here’s a detailed summary of my situation:
FreeSurfer version: 7.4.1 (freesurfer-linux-centos8_x86_64-7.4.1-20230613-7eb8460)
I have successfully run FastSurfer, which completed the segmentation. Here’s the output structure:
subject1/ ├── mri/ │ ├── aparc.DKTatlas+aseg.deep.mgz │ ├── aseg.auto_noCCseg.mgz │ ├── atlas_registered.nii.gz │ ├── cerebellum.CerebNet.nii.gz │ ├── mask.mgz │ ├── orig/ │ ├── orig.mgz │ ├── orig_converted.nii.gz │ ├── orig_nu.mgz │ └── transform.mat ├── scripts/ │ └── deep-seg.log └── stats/ ├── aseg+DKT.stats └── cerebellum.CerebNet.stats
I am now trying to run the FreeSurfer thalamic nuclei segmentation without running recon-all, as I understand this should be possible directly on the FastSurfer output.
The command I am attempting to use for thalamic nuclei segmentation is:
singularity exec -B /path/to/fastsurfer/output:/data -e /path/to/freesurfer.sif bash -c ‘export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/freesurfer/MCRv97/runtime/glnxa64:/usr/local/freesurfer/MCRv97/bin/glnxa64:/usr/local/freesurfer/MCRv97/sys/os/glnxa64:/usr/local/freesurfer/MCRv97/extern/bin/glnxa64 && export MCR_CACHE_ROOT=/path/to/mcr_cache && segmentThalamicNuclei.sh subject1 /data/fastsurfer_output’
When trying to run this command, I get an error indicating that the MATLAB Runtime (MCR) 2019b is not found.
I have attempted to install MCR using fs_install_mcr R2019b, but the installation fails with the following error:
mv: inter-device move failed: ‘/tmp/tmp.XXXXXXXX/install-target/v97’ to ‘/usr/local/freesurfer/MCRv97’; unable to remove target: Read-only file system
I have tried various approaches to resolve this issue, including: Binding different directories Setting LD_LIBRARY_PATH Creating symbolic linksNone of these attempts have been successful.
My questions are:
Any guidance or suggestions would be greatly appreciated. Please let me know if you have any questions. Thank you in advance for your help and thanks to the Fastsurfer community!