WCHN / CTseg

Brain CT image segmentation, normalisation, skull-stripping and total brain/intracranial volume computation.
GNU General Public License v3.0
56 stars 17 forks source link

Failed: Deformations #18

Open Defuse3 opened 1 year ago

Defuse3 commented 1 year ago

23-Jul-2022 22:25:03 - Running job #4

23-Jul-2022 22:25:03 - Running 'Deformations' 23-Jul-2022 22:25:03 - Failed 'Deformations' 错误使用 readhdr (第 39 行) Error reading header file "C:\Users\Dawn\Desktop\science\spm12-CTseg\y*.nii". In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\@nifti\private\read_hdr.m" (v7504), function "read_hdr" at line 39. In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\@nifti\nifti.m" (v7758), function "nifti" at line 26. In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\spm_deformations.m" (v7700), function "get_def" at line 191. In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\spm_deformations.m" (v7700), function "get_job" at line 78. In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\spm_deformations.m" (v7700), function "get_comp" at line 48. In file "C:\Users\Dawn\Desktop\science\spm12-CTseg\spm_deformations.m" (v7700), function "spm_deformations" at line 17.

The following modules did not run: Failed: Deformations

错误使用 MATLABbatch system Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the exact #job as displayed in this error message)

how to solve this problem?

brudfors commented 1 year ago

Hi @Defuse3

What function are you calling in order to see this error message, is it spm_CTseg? It looks like perhaps the deformation file C:\Users\Dawn\Desktop\science\spm12-CTseg\y_*.nii is not correctly specified, maybe have a look at that.

Defuse3 commented 1 year ago

Thanks to the author's reply, I have solved this problem, and I would also like to ask you a question here, how to quickly get the volume of the segmented CSF, brain white matter.

brudfors commented 1 year ago

Glad to hear you solved it!

CTseg returns total brain (GM + WM) and total intracranial (GM + WM + CSF) volume. If you want the individual volumes, perhaps look at the code around this line (and modify it as necessary):

https://github.com/WCHN/CTseg/blob/08161dc2d1dbfab8c4963808ca1626b4e6d77ccf/spm_CTseg.m#L246

k=1 is GM, k=2 is WM and k=3 is CSF.