Skip to content

Commit beefe81

Browse files
authored
Merge pull request #3005 from stilley2/feature/index_mask_file
ENH: Add index_mask_file input to ImageStats
2 parents 9235266 + 22efaf7 commit beefe81

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.zenodo.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,11 @@
695695
"affiliation": "MIT, HMS",
696696
"name": "Ghosh, Satrajit",
697697
"orcid": "0000-0002-5312-6729"
698+
},
699+
{
700+
"affiliation": "Holland Bloorview Kids Rehabilitation Hospital",
701+
"name": "Tilley II, Steven",
702+
"orcid": "0000-0003-4853-5082"
698703
}
699704
],
700705
"keywords": [

nipype/interfaces/fsl/tests/test_auto_ImageStats.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ def test_ImageStats_inputs():
1414
argstr='%s',
1515
extensions=None,
1616
mandatory=True,
17+
position=3,
18+
),
19+
index_mask_file=dict(
20+
argstr='-K %s',
21+
extensions=None,
1722
position=2,
1823
),
1924
mask_file=dict(
@@ -23,7 +28,7 @@ def test_ImageStats_inputs():
2328
op_string=dict(
2429
argstr='%s',
2530
mandatory=True,
26-
position=3,
31+
position=4,
2732
),
2833
output_type=dict(),
2934
split_4d=dict(

nipype/interfaces/fsl/utils.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,18 +725,25 @@ class ImageStatsInputSpec(FSLCommandInputSpec):
725725
exists=True,
726726
argstr="%s",
727727
mandatory=True,
728-
position=2,
728+
position=3,
729729
desc='input file to generate stats of')
730730
op_string = traits.Str(
731731
argstr="%s",
732732
mandatory=True,
733-
position=3,
733+
position=4,
734734
desc=("string defining the operation, options are "
735735
"applied in order, e.g. -M -l 10 -M will "
736736
"report the non-zero mean, apply a threshold "
737737
"and then report the new nonzero mean"))
738738
mask_file = File(
739739
exists=True, argstr="", desc='mask file used for option -k %s')
740+
index_mask_file = File(
741+
exists=True,
742+
argstr="-K %s",
743+
position=2,
744+
desc="generate seperate n submasks from indexMask, "
745+
"for indexvalues 1..n where n is the maximum index "
746+
"value in indexMask, and generate statistics for each submask")
740747

741748

742749
class ImageStatsOutputSpec(TraitedSpec):

0 commit comments

Comments
 (0)