Skip to content

Commit

Permalink
FIX do not use a default layout selection for multiple volumes (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdoc authored Nov 3, 2023
1 parent cbb9d8e commit 1e69525
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cortex/webgl/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def make_static(outpath, data, types=("inflated",), recache=False, cmap="RdBu_r"
title : str, optional
The title that is displayed on the viewer website when it is loaded in
a browser.
layout : None or list of (int, int)
The layout of the viewer subwindows for showing multiple subjects, passed to
the template generator.
Default to None, corresponding to no subwindows.
Notes
-----
Expand Down Expand Up @@ -133,8 +137,6 @@ def make_static(outpath, data, types=("inflated",), recache=False, cmap="RdBu_r"
package.reorder(ctms)

db.auxfile = None
if layout is None:
layout = [None, (1, 1), (2, 1), (3, 1), (2, 2), (3, 2), (3, 2), (3, 3), (3, 3), (3, 3)][len(subjects)]

## Rename files to anonymize
submap = dict()
Expand Down Expand Up @@ -305,9 +307,10 @@ def show(data, types=("inflated", ), recache=False, cmap='RdBu_r', layout=None,
title : str, optional
The title that is displayed on the viewer website when it is loaded in
a browser.
layout : (int, int), optional
The layout of the viewer subwindows for showing multiple subjects.
Default None, which selects the layout based on the number of subjects.
layout : None or list of (int, int), optional
The layout of the viewer subwindows for showing multiple subjects, passed to
the template generator.
Default None, corresponding to no subwindows.
"""

# populate default webshow args
Expand Down Expand Up @@ -344,8 +347,6 @@ def show(data, types=("inflated", ), recache=False, cmap='RdBu_r', layout=None,
subjectjs = json.dumps(dict((subj, "ctm/%s/"%subj) for subj in subjects))
db.auxfile = None

if layout is None:
layout = [None, (1, 1), (2, 1), (3, 1), (2, 2), (3, 2), (3, 2), (3, 3), (3, 3), (3, 3)][len(subjects)]

linear = lambda x, y, m: (1.-m)*x + m*y
mixes = dict(
Expand Down

0 comments on commit 1e69525

Please sign in to comment.