plotly / dash-slicer

A volume slicer for Dash
https://dash.plotly.com/slicer
MIT License
24 stars 8 forks source link

Annotation tool #58

Closed Subhashis-Banerjee closed 2 years ago

Subhashis-Banerjee commented 2 years ago

Is it possible to interactively annotate slices of a volume in dash-slicer?

almarklein commented 2 years ago

Yes, see for example https://dash.gallery/dash-covid-xray/. Dash-slicer has support for masks, so you can visualize the data as well as an overlay. The interaction (how mouse clicks result in changes to the mask) are for you to implement.

Subhashis-Banerjee commented 2 years ago

Hi Almar, thanks for the link "https://dash.gallery/dash-covid-xray/". In the app, if I draw annotation then it does not change with slide change (images attached). I need to annotate different slices with different shapes as 3D slicer supports. 1

I am new to Dash-Slicer, it would be very helpful if you can provide some code on handling such annotation. 

almarklein commented 2 years ago

That's because of how that app works. It is not per-slice, but you select a rough volume. If you are writing an app yourself in which you want per-slice annotations, you need to eg. reset the drawing tool.