-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #461 from cpp-lln-lab/remi-get_task_and_space_from…
…_model [ENH] use BIDS stats model to select input task, space and override options
- Loading branch information
Showing
81 changed files
with
506 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,4 +119,4 @@ | |
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,4 @@ | |
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Making figures for the doc | ||
|
||
Making DAGs (directed acyclic graphs) with makefile and | ||
[makefile2graph](https://github.com/lindenb/makefile2graph). | ||
|
||
``` | ||
make -Bnd | make2graph | dot -Tpng -o out.png | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.PHONY: all sub-01_T1w.nii setBatchSegmentation.m setBatSkullstripping.m bidsRename.m | ||
|
||
all: sub-01_space-individual_label-GM_probseg.nii | ||
|
||
# Rename | ||
sub-01_space-individual_label-GM_probseg.nii: bidsRename.m c1sub-01_T1w.nii | ||
|
||
sub-01_space-individual_label-WM_probseg.nii: bidsRename.m c2sub-01_T1w.nii | ||
|
||
sub-01_space-individual_label-CSF_probseg.nii: bidsRename.m c3sub-01_T1w.nii | ||
|
||
sub-01_from-IXI549Space_to-T1w_mode-image_xfm.nii: bidsRename.m iysub-01_T1w.nii | ||
|
||
sub-01_from-T1w_to-IXI549Space_mode-image_xfm.nii: bidsRename.m ysub-01_T1w.nii | ||
|
||
|
||
# Skullstripping | ||
sub-01_space-individual_desc-skullstripped_T1w.nii: setBatSkullstripping.m msub-01_T1w.nii c1sub-01_T1w.nii c2sub-01_T1w.nii c3sub-01_T1w.nii | ||
|
||
sub-01_space-individual_label-brain_mask.nii: setBatSkullstripping.m msub-01_T1w.nii c1sub-01_T1w.nii c2sub-01_T1w.nii c3sub-01_T1w.nii | ||
|
||
|
||
# Segmentation | ||
msub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
c1sub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
c2sub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
c3sub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
sub-01_label-T1w_segparam: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
ysub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii | ||
|
||
iysub-01_T1w.nii: setBatchSegmentation.m sub-01_T1w.nii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
function [I] = iqr_method(a, out) | ||
% | ||
% Returns a logical vector that flags outliers as 1s based | ||
% on the IQR (interquantile range) methods described in Wilcox 2012 p 96-97. | ||
% | ||
% Uses Carling's modification of the boxplot rule. | ||
% | ||
% An observation Xi is declared an outlier if: | ||
% | ||
% Xi<M-k(q2-q1) or Xi>M+k(q2-q1) | ||
% | ||
% where: | ||
% - M is the sample median | ||
% - k = (17.63n - 23.64) / (7.74n - 3.71), | ||
% - where n is the sample size. | ||
% | ||
% INPUT a is a vector of data | ||
% out determines the thresholding 1 bilateral 2 unilateral | ||
% | ||
% OUTPUTS: I = logical vector with 1s for outliers | ||
% value = IQR, the inter-quartile range | ||
% | ||
% Cyril Pernet - spmup - adapted from Corr_toolbox | ||
% https://github.com/CPernet/spmup | ||
% ---------------------------------------- | ||
% (C) Copyright 2016 Cyril Pernet | ||
|
||
if nargin == 1 | ||
out = 1; | ||
end | ||
|
||
a = a(:); | ||
n = length(a); | ||
|
||
% inter-quartile range | ||
j = floor(n / 4 + 5 / 12); | ||
|
||
y = sort(a); | ||
|
||
g = (n / 4) - j + (5 / 12); | ||
|
||
q1 = (1 - g) .* y(j) + g .* y(j + 1); | ||
|
||
k = n - j + 1; | ||
q2 = (1 - g) .* y(k) + g .* y(k - 1); | ||
|
||
value = q2 - q1; | ||
|
||
% outliers | ||
M = median(a); | ||
k = (17.63 * n - 23.64) / (7.74 * n - 3.71); | ||
if out == 1 | ||
I = a < (M - k * value) | a > (M + k * value); | ||
else | ||
I = a > (M + k * value); % only reject data with a too high value | ||
end | ||
I = I + isnan(a); | ||
|
||
end |
Oops, something went wrong.