Skip to content

Commit 34424ec

Browse files
committed
fix issue with ALI toolbox
1 parent 60d85a4 commit 34424ec

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/batches/lesion/setBatchLesionSegmentation.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@
2121

2222
[anatImage, anatDataDir] = getAnatFilename(BIDS, opt, subLabel);
2323

24-
hdr = spm_vol(fullfile(anatDataDir, anatImage));
25-
voxRes = diag(hdr.mat);
26-
voxRes = min(voxRes(1:3));
27-
unified_segmentation.step1vox = abs(voxRes);
24+
% TODO
25+
% this needs to be changed
26+
% - to be consistent across subject
27+
% - to reslice the size of the mask that is then used for lesion detection
28+
%
29+
% hdr = spm_vol(fullfile(anatDataDir, anatImage));
30+
% voxRes = diag(hdr.mat);
31+
% voxRes = min(voxRes(1:3));
32+
% unified_segmentation.step1vox = abs(voxRes);
33+
2834
unified_segmentation.step1data{1} = fullfile(anatDataDir, anatImage);
2935

3036
matlabbatch{end + 1}.spm.tools.ali.unified_segmentation = unified_segmentation;

src/defaults/ALI_my_defaults.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@
5252
defaults.toolbox.ALI.outliers_detection.step3tissue.step3Lambda = -4;
5353

5454
% specify lesion mask
55-
defaults.toolbox.ALI.lesionMask = fullfile(spmDir, 'toolbox', 'ALI', ...
56-
'Mask_image', 'mask_controls_vox2mm.nii');
55+
defaults.toolbox.ALI.outliers_detection.step3mask{1} = fullfile(spmDir, ...
56+
'toolbox', ...
57+
'ALI', ...
58+
'Mask_image', ...
59+
'mask_controls_vox2mm.nii');
5760

5861
% threshold for the mask
5962
defaults.toolbox.ALI.outliers_detection.step3mask_thr = 0;

src/workflows/lesion/bidsLesionAbnormalitiesDetection.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ function bidsLesionAbnormalitiesDetection(opt)
8080
matlabbatch = {};
8181
matlabbatch = setBatchLesionAbnormalitiesDetection(matlabbatch, opt, images);
8282

83-
saveAndRunWorkflow(matlabbatch, 'LesionAbnormalitiesDetection', opt, subLabel);
83+
saveAndRunWorkflow(matlabbatch, 'LesionAbnormalitiesDetection', opt);
8484

8585
end

0 commit comments

Comments
 (0)