-
Notifications
You must be signed in to change notification settings - Fork 598
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
Add & toggle shapes/drawings programmatically #1363
Comments
Draw shapes come from Konva, check out their doc to understand how to create one (for example the line tutorial). dwv can then load the shape from a Regarding types, I'm working on it! See #669 Related (?): #1366 |
I'm not sure I understand you... What do you mean by highlight? What type of modifications? |
I have serval AI models that predict wether a stroke is present based on a NCCT image or not. In addition, my team has created explainable AI models that show the important regions for the AI to make this decision. These results we want to present to the user by overlaying them on the original image. Like here e.g. The representation of the highlighted areas is not fixed though. The backend just returns a mask which I can use to calculate the highlighted regions on the dicom viewer. |
Ok, so the green drawings are standard brain regions that have been adapted to the image and according to activations in that image (pink zones), you want to highlight the corresponding regions by making them red. Is that it? |
That's just an example image I searched to illustrate what I mean but yes in essence that's it. So showing the activated regions (with different levels of importance maybe) and the possibility to load them and toggle them on or off. |
Konva shapes then seem more appropriate. Check out this demo viewer, you can draw shapes on the image and then change some of their properties from the draw list page (pencil icon in the top tool bar). |
I hope I answered your question. Feel free to comment if you found limitations with the current implementation. Closing for now. |
we would like to draw programmatically, using the API? any examples for this? |
Check out the state tests, they contain example states: https://github.com/ivmartel/dwv/tree/develop/tests/state |
I'm currently developing an application to view brain scans and need to show areas where a stroke is suspected to be. I have multiple AI models that produce different results so I need to be able to programmatically toggle them on or off. I'm using angular-dwv to be more specific.
My first approach would be to create a custom shape that connects some points to enclose a specific area of interest. However, I have to say that I really struggle with understanding the documentation. My main issue is that I don't know what all methods and classes do and how they are interconnected since there is no linking with parameters and return types. The examples also hardly scratch the surface about what's possible.
Can someone give me some advice how I can better understand the library? Also if anybody could simply show me how to create a simple shape like a Line and how to add this to a dwv.App object it would be really great.
The text was updated successfully, but these errors were encountered: