From daee136c8bc8adf3083311e4c17f230e5bbd4bf2 Mon Sep 17 00:00:00 2001 From: Michele MacLean Date: Mon, 8 Mar 2021 11:57:03 -0500 Subject: [PATCH 1/3] add DetectLesion batch --- src/batches/setBatchDetectLesion.m | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 src/batches/setBatchDetectLesion.m diff --git a/src/batches/setBatchDetectLesion.m b/src/batches/setBatchDetectLesion.m new file mode 100755 index 00000000..2e796d56 --- /dev/null +++ b/src/batches/setBatchDetectLesion.m @@ -0,0 +1,23 @@ +%----------------------------------------------------------------------- +% Job saved on 08-Mar-2021 11:11:19 by cfg_util (rev $Rev: 7345 $) +% spm SPM - SPM12 (7771) +% cfg_basicio BasicIO - Unknown +%----------------------------------------------------------------------- +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1data = ''; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1prior = {'C:\Users\michm\spm12\toolbox\ALI\Priors_extraClass\wc4prior0.nii'}; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1niti = 2; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1thr_prob = 0.333333333333333; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1thr_size = 0.8; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1coregister = 1; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1mask = {''}; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1vox = 2; +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1fwhm = [8 8 8]; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3patients = ''; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3controls = ''; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3Alpha = 0.5; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3Lambda = -4; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3mask = {'C:\Users\michm\spm12\toolbox\ALI\Mask_image\mask_controls_vox2mm.nii'}; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3mask_thr = 0; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3binary_thr = 0.3; +matlabbatch{2}.spm.tools.ali.outliers_detection.step3binary_size = 0.8; +matlabbatch{3}.spm.tools.ali.lesion_overlap.lom = ''; From bbd4e233e71349d4afd20866051cdd8f2b97beca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mich=C3=A8le=20MacLean?= <54547865+mwmaclean@users.noreply.github.com> Date: Mon, 8 Mar 2021 12:30:38 -0500 Subject: [PATCH 2/3] Apply suggestions from code review Change path Co-authored-by: Remi Gau --- src/batches/setBatchDetectLesion.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/batches/setBatchDetectLesion.m b/src/batches/setBatchDetectLesion.m index 2e796d56..ad516821 100755 --- a/src/batches/setBatchDetectLesion.m +++ b/src/batches/setBatchDetectLesion.m @@ -4,7 +4,9 @@ % cfg_basicio BasicIO - Unknown %----------------------------------------------------------------------- matlabbatch{1}.spm.tools.ali.unified_segmentation.step1data = ''; -matlabbatch{1}.spm.tools.ali.unified_segmentation.step1prior = {'C:\Users\michm\spm12\toolbox\ALI\Priors_extraClass\wc4prior0.nii'}; +spmDir = spm('dir'); +lesionPriorMap = fullfile(spmDir, 'toolbox', 'ALI', 'Priors_extraClass', 'wc4prior0.nii) +matlabbatch{1}.spm.tools.ali.unified_segmentation.step1prior = {lesionPriorMap}; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1niti = 2; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1thr_prob = 0.333333333333333; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1thr_size = 0.8; From 2d3164220826371e4e1cb8b2cd76b8a70c0c4dab Mon Sep 17 00:00:00 2001 From: Michele MacLean Date: Mon, 8 Mar 2021 14:39:04 -0500 Subject: [PATCH 3/3] add 3 batches for lesion detection --- src/batches/setBatchAbnormalitiesDetectLesion.m | 14 ++++++++++++++ src/batches/setBatchLesionOverlapMap.m | 6 ++++++ ...Lesion.m => setBatchSegmentationDetectLesion.m} | 11 +---------- 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100755 src/batches/setBatchAbnormalitiesDetectLesion.m create mode 100755 src/batches/setBatchLesionOverlapMap.m rename src/batches/{setBatchDetectLesion.m => setBatchSegmentationDetectLesion.m} (56%) diff --git a/src/batches/setBatchAbnormalitiesDetectLesion.m b/src/batches/setBatchAbnormalitiesDetectLesion.m new file mode 100755 index 00000000..337afe71 --- /dev/null +++ b/src/batches/setBatchAbnormalitiesDetectLesion.m @@ -0,0 +1,14 @@ +%----------------------------------------------------------------------- +% Job saved on 08-Mar-2021 12:47:16 by cfg_util (rev $Rev: 7345 $) +% spm SPM - SPM12 (7771) +% cfg_basicio BasicIO - Unknown +%----------------------------------------------------------------------- +matlabbatch{1}.spm.tools.ali.outliers_detection.step3tissue.step3patients = ''; +matlabbatch{1}.spm.tools.ali.outliers_detection.step3tissue.step3controls = ''; +matlabbatch{1}.spm.tools.ali.outliers_detection.step3tissue.step3Alpha = 0.5; +matlabbatch{1}.spm.tools.ali.outliers_detection.step3tissue.step3Lambda = -4; +spmDir = spm('dir'); +lesionMask = fullfile(spmDir, 'toolbox', 'ALI', 'Mask_image', 'mask_controls_vox2mm.nii'); +matlabbatch{1}.spm.tools.ali.outliers_detection.step3mask_thr = 0; +matlabbatch{1}.spm.tools.ali.outliers_detection.step3binary_thr = 0.3; +matlabbatch{1}.spm.tools.ali.outliers_detection.step3binary_size = 0.8; diff --git a/src/batches/setBatchLesionOverlapMap.m b/src/batches/setBatchLesionOverlapMap.m new file mode 100755 index 00000000..9cde37ad --- /dev/null +++ b/src/batches/setBatchLesionOverlapMap.m @@ -0,0 +1,6 @@ +%----------------------------------------------------------------------- +% Job saved on 08-Mar-2021 12:48:14 by cfg_util (rev $Rev: 7345 $) +% spm SPM - SPM12 (7771) +% cfg_basicio BasicIO - Unknown +%----------------------------------------------------------------------- +matlabbatch{1}.spm.tools.ali.lesion_overlap.lom = ''; diff --git a/src/batches/setBatchDetectLesion.m b/src/batches/setBatchSegmentationDetectLesion.m similarity index 56% rename from src/batches/setBatchDetectLesion.m rename to src/batches/setBatchSegmentationDetectLesion.m index ad516821..eca11150 100755 --- a/src/batches/setBatchDetectLesion.m +++ b/src/batches/setBatchSegmentationDetectLesion.m @@ -5,7 +5,7 @@ %----------------------------------------------------------------------- matlabbatch{1}.spm.tools.ali.unified_segmentation.step1data = ''; spmDir = spm('dir'); -lesionPriorMap = fullfile(spmDir, 'toolbox', 'ALI', 'Priors_extraClass', 'wc4prior0.nii) +lesionPriorMap = fullfile(spmDir, 'toolbox', 'ALI', 'Priors_extraClass', 'wc4prior0.nii'); matlabbatch{1}.spm.tools.ali.unified_segmentation.step1prior = {lesionPriorMap}; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1niti = 2; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1thr_prob = 0.333333333333333; @@ -14,12 +14,3 @@ matlabbatch{1}.spm.tools.ali.unified_segmentation.step1mask = {''}; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1vox = 2; matlabbatch{1}.spm.tools.ali.unified_segmentation.step1fwhm = [8 8 8]; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3patients = ''; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3controls = ''; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3Alpha = 0.5; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3tissue.step3Lambda = -4; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3mask = {'C:\Users\michm\spm12\toolbox\ALI\Mask_image\mask_controls_vox2mm.nii'}; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3mask_thr = 0; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3binary_thr = 0.3; -matlabbatch{2}.spm.tools.ali.outliers_detection.step3binary_size = 0.8; -matlabbatch{3}.spm.tools.ali.lesion_overlap.lom = '';