-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi,
I just came across your paper and decided to try MR-TIM for my new project.
I followed the instructions and ran the pipeline on a T1w with voxels of 1x1x1mm³. The only difference is that I directly installed MR-TIM inside the my /path/to/spm12/toolbox/ directory because I want to be able to build a standalone including your toolbox (to run my whole pipeline on HPC).
Here is the content of the job file I used:
matlabbatch{1}.spm.tools.spm_mrtim.run.anat_image = ...
{'/path/to/in/sub-04146_run-2_T1w.nii,1'};
matlabbatch{1}.spm.tools.spm_mrtim.run.output_folder = {'/path/to/out'};
matlabbatch{1}.spm.tools.spm_mrtim.run.prepro.res = 1;
matlabbatch{1}.spm.tools.spm_mrtim.run.prepro.smooth = 1;
matlabbatch{1}.spm.tools.spm_mrtim.run.prepro.biasreg = 0.001;
matlabbatch{1}.spm.tools.spm_mrtim.run.prepro.biasfwhm = 30;
matlabbatch{1}.spm.tools.spm_mrtim.run.prepro.lowint = 5;
matlabbatch{1}.spm.tools.spm_mrtim.run.tpmopt.tpmimg = ...
{'/path/to/MRTIM/external/NET/template/tissues_MNI/eTPM12.nii,1'};
matlabbatch{1}.spm.tools.spm_mrtim.run.tpmopt.mrf = 1;
matlabbatch{1}.spm.tools.spm_mrtim.run.tpmopt.cleanup = 1;
matlabbatch{1}.spm.tools.spm_mrtim.run.segtiss.gapfill = 1;
matlabbatch{1}.spm.tools.spm_mrtim.run.segtiss.tiss_mask = 1;During the process, I only got the following warning (I also join a full copy of the logs):
::: MR-TIM ::: STEP 2/3 - Tissue probability mapping...
Warning: Name is nonexistent or not a directory:
/path/to/spm12/toolbox/MRTIM/external/NET/net.p
> In path (line 109)
In addpath (line 86)
In net
In spm_mrtim_segment_sMRI
In spm_mrtim_run
In cfg_run_cm (line 26)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In cfg_ui>MenuFileRun_Callback (line 710)
In gui_mainfcn (line 95)
In cfg_ui (line 53)
performing first normalization step...
📎 MR-TIM full logs (click to deploy)
------------------------------------------------------------------------
28-Apr-2021 13:42:50 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:42:50 - Running 'Run'
::: MR-TIM ::: STEP 1/3 - Image pre-processing...
------------------------------------------------------------------------
28-Apr-2021 13:42:55 - Running job #2
------------------------------------------------------------------------
28-Apr-2021 13:42:55 - Running 'Coregister: Estimate'
SPM12: spm_coreg (v7320) 13:42:55 - 28/04/2021
========================================================================
Completed : 13:43:35 - 28/04/2021
28-Apr-2021 13:43:35 - Done 'Coregister: Estimate'
28-Apr-2021 13:43:35 - Done
Direct calls to spm_defauts are deprecated.
Please use spm('Defaults',modality) or spm_get_defaults instead.
------------------------------------------------------------------------
28-Apr-2021 13:43:37 - Running job #2
------------------------------------------------------------------------
28-Apr-2021 13:43:37 - Running 'Segment'
SPM12: spm_preproc_run (v7670) 13:43:37 - 28/04/2021
========================================================================
Segment /path/to/out/rsanatomy.nii,1
Completed : 13:54:08 - 28/04/2021
28-Apr-2021 13:54:08 - Done 'Segment'
28-Apr-2021 13:54:08 - Done
::: MR-TIM ::: STEP 2/3 - Tissue probability mapping...
Warning: Name is nonexistent or not a directory:
/path/to/spm12/toolbox/MRTIM/external/NET/net.p
> In path (line 109)
In addpath (line 86)
In net
In spm_mrtim_segment_sMRI
In spm_mrtim_run
In cfg_run_cm (line 26)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In cfg_ui>MenuFileRun_Callback (line 710)
In gui_mainfcn (line 95)
In cfg_ui (line 53)
performing first normalization step...
------------------------------------------------------------------------
28-Apr-2021 13:54:11 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:54:11 - Running 'Old Normalise: Estimate & Write'
Smoothing by 8 & 8mm..
Coarse Affine Registration..
Fine Affine Registration..
Saving Parameters..
SPM12: spm_write_sn (v4878) 13:54:20 - 28/04/2021
========================================================================
Completed : 13:54:23 - 28/04/2021
28-Apr-2021 13:54:23 - Done 'Old Normalise: Estimate & Write'
28-Apr-2021 13:54:23 - Done
performing second normalization step...
------------------------------------------------------------------------
28-Apr-2021 13:54:24 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:54:24 - Running 'Segment'
SPM12: spm_preproc_run (v7670) 13:54:24 - 28/04/2021
========================================================================
Segment /path/to/out/tmp/wmstructural3D.nii,1
Completed : 13:56:02 - 28/04/2021
28-Apr-2021 13:56:02 - Done 'Segment'
28-Apr-2021 13:56:02 - Done
------------------------------------------------------------------------
28-Apr-2021 13:56:04 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:56:04 - Running 'Coregister: Reslice'
SPM12: spm_reslice (v7141) 13:56:04 - 28/04/2021
========================================================================
Completed : 13:56:05 - 28/04/2021
28-Apr-2021 13:56:05 - Done 'Coregister: Reslice'
28-Apr-2021 13:56:05 - Done
performing second normalization...
------------------------------------------------------------------------
28-Apr-2021 13:56:07 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:56:07 - Running 'Old Normalise: Estimate & Write'
Smoothing by 8 & 8mm..
Coarse Affine Registration..
Fine Affine Registration..
3D CT Norm...
iteration 1: FWHM = 22.32 Var = 10.9967
Saving Parameters..
SPM12: spm_write_sn (v4878) 13:56:13 - 28/04/2021
========================================================================
Completed : 13:56:16 - 28/04/2021
28-Apr-2021 13:56:16 - Done 'Old Normalise: Estimate & Write'
28-Apr-2021 13:56:16 - Done
performing third normalization step...
------------------------------------------------------------------------
28-Apr-2021 13:56:16 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:56:16 - Running 'Segment'
SPM12: spm_preproc_run (v7670) 13:56:16 - 28/04/2021
========================================================================
Segment /path/to/out/tmp/wwmstructural3D.nii,1
Completed : 13:58:56 - 28/04/2021
28-Apr-2021 13:58:56 - Done 'Segment'
28-Apr-2021 13:58:56 - Done
------------------------------------------------------------------------
28-Apr-2021 13:58:56 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:58:56 - Running 'Deformations'
wwmstructural3D 1,1,1
28-Apr-2021 13:58:57 - Done 'Deformations'
28-Apr-2021 13:58:57 - Done
combining deformations to derive total direct and inverse transformations...
------------------------------------------------------------------------
28-Apr-2021 13:58:58 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:58:58 - Running 'Deformations'
28-Apr-2021 13:59:41 - Done 'Deformations'
28-Apr-2021 13:59:41 - Done
------------------------------------------------------------------------
28-Apr-2021 13:59:41 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 13:59:41 - Running 'Deformations'
28-Apr-2021 14:00:08 - Done 'Deformations'
28-Apr-2021 14:00:08 - Done
cleaning up temporary files...
------------------------------------------------------------------------
28-Apr-2021 14:00:09 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 14:00:09 - Running 'Segment'
SPM12: spm_preproc_run (v7670) 14:00:09 - 28/04/2021
========================================================================
Segment /path/to/out/anatomy_prepro_mni.nii,1
Completed : 14:02:26 - 28/04/2021
28-Apr-2021 14:02:26 - Done 'Segment'
28-Apr-2021 14:02:26 - Done
------------------------------------------------------------------------
28-Apr-2021 14:02:26 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 14:02:26 - Running 'Deformations'
c1anatomy_prepro_mni 1,1,1
c2anatomy_prepro_mni 1,1,1
c3anatomy_prepro_mni 1,1,1
c4anatomy_prepro_mni 1,1,1
c5anatomy_prepro_mni 1,1,1
c6anatomy_prepro_mni 1,1,1
c7anatomy_prepro_mni 1,1,1
c8anatomy_prepro_mni 1,1,1
c9anatomy_prepro_mni 1,1,1
c10anatomy_prepro_mni 1,1,1
c11anatomy_prepro_mni 1,1,1
c12anatomy_prepro_mni 1,1,1
28-Apr-2021 14:02:50 - Done 'Deformations'
28-Apr-2021 14:02:50 - Done
------------------------------------------------------------------------
28-Apr-2021 14:02:51 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 14:02:51 - Running 'Deformations'
tmp 1,1,1
28-Apr-2021 14:02:53 - Done 'Deformations'
28-Apr-2021 14:02:53 - Done
------------------------------------------------------------------------
28-Apr-2021 14:02:54 - Running job #1
------------------------------------------------------------------------
28-Apr-2021 14:02:54 - Running 'Deformations'
tmp 1,1,1
28-Apr-2021 14:02:56 - Done 'Deformations'
28-Apr-2021 14:02:56 - Done
SPM12: spm_reslice (v7141) 14:02:56 - 28/04/2021
========================================================================
Completed : 14:03:04 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:04 - 28/04/2021
========================================================================
Completed : 14:03:11 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:12 - 28/04/2021
========================================================================
Completed : 14:03:19 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:19 - 28/04/2021
========================================================================
Completed : 14:03:27 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:27 - 28/04/2021
========================================================================
Completed : 14:03:35 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:35 - 28/04/2021
========================================================================
Completed : 14:03:42 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:43 - 28/04/2021
========================================================================
Completed : 14:03:50 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:50 - 28/04/2021
========================================================================
Completed : 14:03:58 - 28/04/2021
SPM12: spm_reslice (v7141) 14:03:58 - 28/04/2021
========================================================================
Completed : 14:04:06 - 28/04/2021
SPM12: spm_reslice (v7141) 14:04:06 - 28/04/2021
========================================================================
Completed : 14:04:13 - 28/04/2021
SPM12: spm_reslice (v7141) 14:04:14 - 28/04/2021
========================================================================
Completed : 14:04:21 - 28/04/2021
SPM12: spm_reslice (v7141) 14:04:22 - 28/04/2021
========================================================================
Completed : 14:04:29 - 28/04/2021
::: MR-TIM ::: STEP 3/3 - Tissue segmentation...
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12
Adjusting...
Saving results...
::: MR-TIM processing DONE! :::
28-Apr-2021 14:06:17 - Done 'Run'
28-Apr-2021 14:06:17 - Done
Once done, I obtained the following files;
.
├── anatomy.nii
├── anatomy_prepro_mni.nii
├── anatomy_prepro_mni_seg8.mat
├── anatomy_prepro.nii
├── anatomy_prepro_segment.nii
├── anatomy_prepro_tpm.nii
├── iy_anatomy_prepro.nii
├── y_anatomy_prepro.nii
└── tissue_masks
├── bGM.nii
├── brainstem.nii (Almost empty)
├── bWM.nii (Empty)
├── cGM.nii (Empty)
├── compacta.nii
├── CSF.nii
├── cWM.nii
├── eyes.nii
├── fat.nii
├── muscle.nii
├── skin.nii
└── spongiosa.nii
Opening the anatomy_prepro_segment.nii file, I get:

As shown in the histogram, bWM, cWM and brainstem classes are empty. When I open these files, the are indeed empty. Only the brainstem has voxels set to 1 but only in one layer and in a very small region:

In addition, you can see that some voxels on the top of the head are classified as CSF but should not.
Do you, by any chance, have an idea on how to fix this (from my side or from yours)?
Thanks in advance 🙂