Skip to content

Commit

Permalink
FIX pass overlay_file arg when creating cutout.
Browse files Browse the repository at this point in the history
  • Loading branch information
cchen23 committed Sep 6, 2023
1 parent e07c4b9 commit 754b37a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cortex/quickflat/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def add_connected_vertices(fig, dataview, exclude_border_width=None,
lc_object = ax.add_collection(lc)
return lc_object

def add_cutout(fig, name, dataview, layers=None, height=None, extents=None):
def add_cutout(fig, name, dataview, layers=None, height=None, extents=None, overlay_file=None):
"""Apply a cutout mask to extant layers in flatmap figure
Parameters
Expand Down Expand Up @@ -567,7 +567,7 @@ def add_cutout(fig, name, dataview, layers=None, height=None, extents=None):
height = _get_height(fig)
if extents is None:
extents = _get_extents(fig)
svgobject = db.get_overlay(dataview.subject)
svgobject = db.get_overlay(dataview.subject, overlay_file=overlay_file)
# Set other cutouts to be invisible
for co_name, co_shape in svgobject.cutouts.shapes.items():
co_shape.visible = co_name == name
Expand Down
2 changes: 1 addition & 1 deletion cortex/quickflat/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def make_figure(braindata, recache=False, pixelwise=True, thick=32, sampler='nea

# Add (apply) cutout of flatmap
if cutout is not None:
extents = composite.add_cutout(ax, cutout, dataview, layers)
extents = composite.add_cutout(ax, cutout, dataview, layers, overlay_file=overlay_file)

if with_colorbar:
colorbar_location = _check_colorbar_location(colorbar_location)
Expand Down

0 comments on commit 754b37a

Please sign in to comment.