Skip to content

Commit

Permalink
Merge pull request #74 from oesteban/enh/renameINU
Browse files Browse the repository at this point in the history
Rename INU measures, compute range instead boundaries
  • Loading branch information
oesteban committed Apr 13, 2016
2 parents 5021d7b + 4b44d7f commit 26bd673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mriqc/interfaces/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @Date: 2016-01-05 11:29:40
# @Email: code@oscaresteban.es
# @Last modified by: oesteban
# @Last Modified time: 2016-04-13 12:23:29
# @Last Modified time: 2016-04-13 14:29:28
""" Nipype interfaces to quality control measures """

import numpy as np
Expand Down Expand Up @@ -39,7 +39,7 @@ class StructuralQCOutputSpec(TraitedSpec):
rpve = traits.Dict(desc='partial volume fractions')
size = traits.Dict(desc='image sizes')
spacing = traits.Dict(desc='image sizes')
bias = traits.Dict(desc='summary statistics of the bias field')
inu = traits.Dict(desc='summary statistics of the bias field')
snr = traits.Dict
cnr = traits.Float
fber = traits.Float
Expand Down Expand Up @@ -141,8 +141,8 @@ def _run_interface(self, runtime):

# Bias
bias = nb.load(self.inputs.in_bias).get_data()[segdata > 0]
self._results['bias'] = {
'max': bias.max(), 'min': bias.min(), 'med': np.median(bias)} #pylint: disable=E1101
self._results['inu'] = {
'range': np.abs(np.percentile(bias, 95.) - np.percentile(bias, 5.)), 'med': np.median(bias)} #pylint: disable=E1101


# Flatten the dictionary
Expand Down
4 changes: 2 additions & 2 deletions mriqc/reports/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @Date: 2016-01-05 11:33:39
# @Email: code@oscaresteban.es
# @Last modified by: oesteban
# @Last Modified time: 2016-04-13 13:22:06
# @Last Modified time: 2016-04-13 14:29:53
""" Encapsulates report generation functions """

import sys
Expand All @@ -28,7 +28,7 @@
STRUCTURAL_QCGROUPS = [
['icvs_csf', 'icvs_gm', 'icvs_wm'],
['rpve_csf', 'rpve_gm', 'rpve_wm'],
['bias_max', 'bias_med', 'bias_min'],
['inu_range', 'inu_med'],
['cnr'], ['efc'], ['fber'], ['cjv'],
['fwhm', 'fwhm_x', 'fwhm_y', 'fwhm_z'],
['qi1', 'qi2'],
Expand Down

0 comments on commit 26bd673

Please sign in to comment.