pBFSLab / FastCSR

27 stars 5 forks source link

levelset #6

Open ihoioi opened 2 months ago

ihoioi commented 2 months ago

Dear Author,Greetings! I would like to apologize for any inconvenience my questions may cause. As a newcomer to the field, I am encountering some challenges while learning and utilizing the FastCSR, and I am seeking your assistance.Firstly, with the code you provided, I have successfully obtained the whole brain white matter mask file (wm.mgz). However, I am currently uncertain about how to segment this comprehensive white matter mask into individual masks for the left and right hemispheres within your process. Which part of the code should I review or write to achieve this step?Secondly, regarding the predicted level sets, I understand that they are trained based on the four labels generated by the FreeSurfer's mris_volmask command. This suggests that the generated level sets should be associated with the white matter mask, does it not? Nevertheless, after examining the args.pial option, I have not been able to locate any files or code related to the generation of pial surfaces. It is possible that my unfamiliarity with some concepts and procedures as a beginner has led me to overlook them.I greatly appreciate you taking the time to read my questions amidst your busy schedule, and I am looking forward to your valuable feedback.

weiwei2027 commented 2 months ago

@ihoioi Hi~,I'm glad you're interested in this work. And i try to answer your question. First, the file structure and naming saved by FastCSR are consistent with FreeSurfer, except for the levelset file. You can refer to the FreeSurfer documentation for instructions. If you want to get the white matter mask for the left and right hemispheres, a simple way is to get it from the levelset file by thresholding. Second, FastCSR only generates white surface and corresponding levelset, and pial surface generation is based on FreeSurfer mris_make_surfaces command.

ihoioi commented 2 months ago

Dear Author,Hello! First and foremost, I would like to express my deep gratitude for your previous response, which has been immensely helpful in my understanding of the FastCSR workflow. However, I have a couple of follow-up questions for which I hope to receive further guidance.My first question pertains to the generation of the left and right white matter masks. Based on my understanding, these should be directly generated after loading the pre-trained models you provided (Task601_filled and Task602_AsegPresurf). So, why is it necessary to re-obtain them from the levelset files?Secondly, in your instructions regarding args.pial, you provided two sets of commands. One is "recon-all", and the other is "mris_make_surfaces -aseg aseg.presurf -white white.preaparc -noaparc -whiteonly". I understand that the pial surface is generated by executing the mris_make_surfaces command, resulting in the files "lh.white.preaparc" and "rh.white.preaparc", is that correct?Once again, I appreciate your patient response. As a beginner, I greatly value every bit of guidance you provide.

weiwei2027 commented 2 months ago

You are welcome. First, you can get the white matter mask from Task601_filled and Task602_AsegPresurf result. Getting it from levelset is another way. The results of the two methods will be slightly different. Secondly, the behavior of the "recon-all" command is more complicated than "mris_make_surfaces. Please see the documentation (https://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllTableStableV6.0) and command execution log for details. The generated file name can be specified, and there is also a default name. The command parameters when generating are more important.

ihoioi commented 2 months ago

Dear Author,Greetings once again, and I apologize for the disturbance. I have some inquiries regarding the pre-trained models you provided, Task601_filled and Task602_AsegPresurf. Could you please elaborate on how these models were trained?When executing the brain_finalsurfs_model_infer.py script, I observed that it takes a pre-trained model parameter named brain_finalsurfs_model.pth and generates a file called brain.finalsurfs.mgz. I am not entirely familiar with the topological aspects of the Nighres toolkit. Is the brain.finalsurfs.mgz file generated for topological operations, or is it used to compute other parameters?Furthermore, what was used as the training label for the brain_finalsurfs_model.pth model during its training process?I greatly appreciate your patient explanations and assistance.

weiwei2027 commented 2 months ago

Sorry for the late reply, I've been busy with other things recently. The training of Task601_filled and Task602_AsegPresurf follows the standard nnUNet segmentation task training process, and the training labels are the FreeSurfer processing results. Similarly, brain_finalsurfs_model is trained to generate brain.finalsurfs.mgz, which is used when generating pial surface later. This model training is a standard regression task. Nighres is used for topology correction and mesh reconstruction tasks and only works on levelset.

ihoioi commented 2 months ago

Thank you very much for your detailed response and valuable feedback