-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
I am trying to apply a colormap to already segmented images, i.e. I want to be able to color the labels when I change the slice index but I dont know how to incorporate input argument "value" in my function or do I even need that since I based my code on the example threshold_overlay.py but I don't need the contrast limit.
This is the code snippet:
@app.callback(
[
Output(slicer1.overlay_data.id, "data")
],
[Input("main-slider", "value")]
)
def apply_colors(value):
print(value)
mask = mask.astype(np.uint8)
return slicer1.create_overlay_data(mask, colormap_gt)
I have three Slicer objects and I want on the two of those three to color the labels.
The thing is my mask is already defined, i.e. my segmented images with 8 possible values (from 1 through 8).
I would really appreciate if someone could help me with this.
When I run the app in the browser, it displays the error:
dash.exceptions.InvalidCallbackReturnValue: Invalid number of output values for ..slicer2-overlay.data...
Expected 1, got 139
But my mask is already the same shape as the volume.
Metadata
Metadata
Assignees
Labels
No labels