Skip to content

Commit a0bff06

Browse files
authored
Merge pull request #723 from cpp-lln-lab/add_resize
[FIX] fix ALI toolbox issues
2 parents 2c39d6f + 34424ec commit a0bff06

File tree

9 files changed

+37
-10
lines changed

9 files changed

+37
-10
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@
145145
"contributions": [
146146
"bug"
147147
]
148+
},
149+
{
150+
"login": "christine0903",
151+
"name": "Christine Chouinard-Leclaire",
152+
"avatar_url": "https://avatars.githubusercontent.com/u/70207207?v=4",
153+
"profile": "https://github.com/christine0903",
154+
"contributions": [
155+
"ideas"
156+
]
148157
}
149158
],
150159
"contributorsPerLine": 7,

.github/workflows/validate_cff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
pip3 install cffconvert
3636
3737
- name: Validate CITATION.cff
38-
run: cffconvert --validate
38+
run: make validate_cff

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ repos:
5555
- id: black
5656

5757
- repo: https://github.com/asottile/reorder_python_imports
58-
rev: v3.3.0
58+
rev: v3.8.1
5959
hooks:
6060
- id: reorder-python-imports

CITATION.cff

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ authors:
8080
orcid: "https://orcid.org/0000-0001-8681-5267"
8181
affiliation: "Université catholique de Louvain"
8282

83+
- family-names: "Chouinard-Leclaire"
84+
given-names: "Christine"
85+
orcid: "https://orcid.org/0000-0002-1066-6266"
86+
affiliation: "Université de Montréal"
87+
8388
license: GPL-3.0
8489

8590
keywords:

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ fix_submodule: ## Fix any submodules that would not be checked out
4848
version.txt: CITATION.cff
4949
grep -w "^version" CITATION.cff | sed "s/version: /v/g" > version.txt
5050

51+
validate_cff: ## Validate the citation file
52+
cffconvert --validate
53+
5154

5255
################################################################################
5356
# doc

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
1212
[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_SPM/branch/main/graph/badge.svg?token=PMQYH0DIPX)](https://codecov.io/gh/cpp-lln-lab/CPP_SPM)
1313
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3554331.svg)](https://doi.org/10.5281/zenodo.3554331)
14-
[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](https://github.com/cpp-lln-lab/CPP_SPM#contributors)
14+
[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](https://github.com/cpp-lln-lab/CPP_SPM#contributors)
1515

1616
<!-- markdown-link-check-enable -->
1717

@@ -180,6 +180,7 @@ Thanks goes to these wonderful people
180180
<td align="center"><a href="https://github.com/mcgnunes"><img src="https://avatars.githubusercontent.com/u/98760858?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Márcia Nunes</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_SPM/issues?q=author%3Amcgnunes" title="Bug reports">🐛</a></td>
181181
<td align="center"><a href="https://cpplab.be"><img src="https://avatars0.githubusercontent.com/u/55407947?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Olivier Collignon</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_SPM/commits?author=OliColli" title="Code">💻</a> <a href="#design-OliColli" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_SPM/commits?author=OliColli" title="Documentation">📖</a></td>
182182
<td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_SPM/commits?author=Remi-Gau" title="Code">💻</a> <a href="https://github.com/cpp-lln-lab/CPP_SPM/commits?author=Remi-Gau" title="Documentation">📖</a> <a href="#infra-Remi-Gau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_SPM/pulls?q=is%3Apr+reviewed-by%3ARemi-Gau" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/cpp-lln-lab/CPP_SPM/issues?q=author%3ARemi-Gau" title="Bug reports">🐛</a> <a href="https://github.com/cpp-lln-lab/CPP_SPM/commits?author=Remi-Gau" title="Tests">⚠️</a></td>
183+
<td align="center"><a href="https://github.com/christine0903"><img src="https://avatars.githubusercontent.com/u/70207207?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christine Chouinard-Leclaire</b></sub></a><br /><a href="#ideas-christine0903" title="Ideas, Planning, & Feedback">🤔</a></td>
183184
</tr>
184185
</table>
185186

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)