Skip to content
Snippets Groups Projects
Commit 690587cf authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Merge branch 'oxford'

parents 43dfb19f 8968c5e8
No related branches found
No related tags found
No related merge requests found
...@@ -365,43 +365,42 @@ def loadClusterResults(featdir, settings, contrast): ...@@ -365,43 +365,42 @@ def loadClusterResults(featdir, settings, contrast):
def __init__(self, **kwargs): def __init__(self, **kwargs):
for name, val in kwargs.items(): for name, val in kwargs.items():
attrName, atype = colmap[name] attrName = colmap[name]
if val is not None: if val is not None:
val = atype(val) val = float(val)
setattr(self, attrName, val) setattr(self, attrName, val)
# This dict provides a mapping between # This dict provides a mapping between
# Cluster object attribute names, and # Cluster object attribute names, and
# the corresponding column name in the # the corresponding column name in the
# cluster.txt file. And the value type # cluster.txt file.
# is thrown in as well, for good measure.
colmap = { colmap = {
'Cluster Index' : ('index', int), 'Cluster Index' : 'index',
'Voxels' : ('nvoxels', int), 'Voxels' : 'nvoxels',
'P' : ('p', float), 'P' : 'p',
'-log10(P)' : ('logp', float), '-log10(P)' : 'logp',
'Z-MAX' : ('zmax', float), 'Z-MAX' : 'zmax',
'Z-MAX X (vox)' : ('zmaxx', int), 'Z-MAX X (vox)' : 'zmaxx',
'Z-MAX Y (vox)' : ('zmaxy', int), 'Z-MAX Y (vox)' : 'zmaxy',
'Z-MAX Z (vox)' : ('zmaxz', int), 'Z-MAX Z (vox)' : 'zmaxz',
'Z-COG X (vox)' : ('zcogx', int), 'Z-COG X (vox)' : 'zcogx',
'Z-COG Y (vox)' : ('zcogy', int), 'Z-COG Y (vox)' : 'zcogy',
'Z-COG Z (vox)' : ('zcogz', int), 'Z-COG Z (vox)' : 'zcogz',
'Z-MAX X (mm)' : ('zmaxx', float), 'Z-MAX X (mm)' : 'zmaxx',
'Z-MAX Y (mm)' : ('zmaxy', float), 'Z-MAX Y (mm)' : 'zmaxy',
'Z-MAX Z (mm)' : ('zmaxz', float), 'Z-MAX Z (mm)' : 'zmaxz',
'Z-COG X (mm)' : ('zcogx', float), 'Z-COG X (mm)' : 'zcogx',
'Z-COG Y (mm)' : ('zcogy', float), 'Z-COG Y (mm)' : 'zcogy',
'Z-COG Z (mm)' : ('zcogz', float), 'Z-COG Z (mm)' : 'zcogz',
'COPE-MAX' : ('copemax', float), 'COPE-MAX' : 'copemax',
'COPE-MAX X (vox)' : ('copemaxx', int), 'COPE-MAX X (vox)' : 'copemaxx',
'COPE-MAX Y (vox)' : ('copemaxy', int), 'COPE-MAX Y (vox)' : 'copemaxy',
'COPE-MAX Z (vox)' : ('copemaxz', int), 'COPE-MAX Z (vox)' : 'copemaxz',
'COPE-MAX X (mm)' : ('copemaxx', float), 'COPE-MAX X (mm)' : 'copemaxx',
'COPE-MAX Y (mm)' : ('copemaxy', float), 'COPE-MAX Y (mm)' : 'copemaxy',
'COPE-MAX Z (mm)' : ('copemaxz', float), 'COPE-MAX Z (mm)' : 'copemaxz',
'COPE-MEAN' : ('copemean', float)} 'COPE-MEAN' : 'copemean'}
# An error will be raised if the # An error will be raised if the
# cluster file does not exist (e.g. # cluster file does not exist (e.g.
......
...@@ -275,13 +275,13 @@ class TimeSeriesPanel(plotpanel.OverlayPlotPanel): ...@@ -275,13 +275,13 @@ class TimeSeriesPanel(plotpanel.OverlayPlotPanel):
# If this is an image in a FEAT directory, but the # If this is an image in a FEAT directory, but the
# filtered_func_data for that FEAT directory has # filtered_func_data for that FEAT directory has
# not been loaded, we show nothing. # not been loaded, we show nothing.
if not isinstance(overlay, fslfeatimage.FEATImage) and \ if not isinstance(overlay, fslfeatimage.FEATImage):
featImage is None:
return None, None, None if featImage is None: return None, None, None
else: overlay = featImage
# If the filtered_func for this FEAT analysis # If the filtered_func for this FEAT analysis
# has been loaded, we show its time series. # has been loaded, we show its time series.
overlay = featImage
ts = plotting.FEATTimeSeries(self, ts = plotting.FEATTimeSeries(self,
overlay, overlay,
self._displayCtx) self._displayCtx)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment