diff --git a/cortex/quickflat/composite.py b/cortex/quickflat/composite.py index 4a90a667..01846e21 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 6307427a..e213efc9 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)