Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX pass overlay_file arg when creating cutout. #496

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading