CTseg icon indicating copy to clipboard operation
CTseg copied to clipboard

Failed: Deformations

Open Defuse3 opened this issue 1 year ago • 3 comments

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' 错误使用 read_hdr (第 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?

Defuse3 avatar Jul 23 '22 14:07 Defuse3

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.

brudfors avatar Jul 25 '22 07:07 brudfors

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.

Defuse3 avatar Jul 25 '22 14:07 Defuse3

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.

brudfors avatar Jul 25 '22 15:07 brudfors