Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantitative MR - QC #24

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@
'visualqc_diffusion=visualqc.__diffusion__:main',
'visualqc_freesurfer=visualqc.__freesurfer__:main',
'visualqc_alignment=visualqc.__alignment__:main',
'visualqc_quantitative=visualqc.__quantitative__:main',
# shortcuts
'vqct1=visualqc.__t1_mri__:main',
'vqcfunc=visualqc.__func_mri__:main',
'vqcdwi=visualqc.__diffusion__:main',
'vqcfs=visualqc.__freesurfer__:main',
'vqcalign=visualqc.__alignment__:main'
'vqcalign=visualqc.__alignment__:main',
'vqcqmr=visualqc.__quantitative__:main'
]
},
include_package_data=True,
Expand Down
14 changes: 14 additions & 0 deletions visualqc/__quantitative__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from sys import version_info

if version_info.major > 2:
from visualqc import quantitative
else:
raise NotImplementedError('visualqc_quantitative requires Python 3 or higher!')

def main():
"Entry point."

quantitative.cli_run()

if __name__ == '__main__':
main()
22 changes: 22 additions & 0 deletions visualqc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@
alpha_background_slice_alignment = 1.0
alpha_edge_overlay_alignment = 1.0

## ----------------------------------------------------------------------------
# Quantitative MR
## ----------------------------------------------------------------------------

qmr_alignment_rating = OrderedDict(a='Aligned', o='Not aligned')
default_qmr_alignment_ratings = tuple(qmr_alignment_rating.values())

qmr_contrast_rating = OrderedDict(g='Good contrast', b='Bad contrast')
default_qmr_contrast_ratings = tuple(qmr_contrast_rating.values())

position_alignment_radio_button = [0.895, 0.55, 0.1, 0.19]
position_contrast_radio_button = [0.895, 0.32, 0.1, 0.25]

position_contrast_button = [0.905, 0.80, 0.08, 0.04]

color_contrast_button = 'xkcd:maroon'
color_contrast_axis = 'xkcd:purple'
color_alignment_axis = 'xkcd:orange'

position_annotate_fg_quantMR = [0.45, 0.5]
annotate_fg_quantMR_properties = dict(fontsize=30, color='xkcd:pale orange')

## ----------------------------------------------------------------------------
# Groupwise comparison of registration/alignment
## ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion visualqc/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def init_getters(self):
self.feature_extractor = diffusion_mri_features

if 'BIDS' in self.in_dir_type.upper():
from bids.grabbids import BIDSLayout
from bids import BIDSLayout
self.bids_layout = BIDSLayout(self.in_dir)
self.units = diffusion_traverse_bids(self.bids_layout)
# file name of each scan is the unique identifier,
Expand Down
Loading