From 754b37ab484b695c2bbc21db5ecaff4ddfc89638 Mon Sep 17 00:00:00 2001 From: cchen23 Date: Tue, 5 Sep 2023 21:30:56 -0700 Subject: [PATCH] FIX pass overlay_file arg when creating cutout. --- cortex/quickflat/composite.py | 4 ++-- cortex/quickflat/view.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cortex/quickflat/composite.py b/cortex/quickflat/composite.py index 4a90a6677..01846e212 100644 --- a/cortex/quickflat/composite.py +++ b/cortex/quickflat/composite.py @@ -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 @@ -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 diff --git a/cortex/quickflat/view.py b/cortex/quickflat/view.py index 6307427a0..e213efc9d 100644 --- a/cortex/quickflat/view.py +++ b/cortex/quickflat/view.py @@ -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)