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

create JSON in dwv state.json format from user coordinates #1366

Closed
roshtha opened this issue May 15, 2023 · 4 comments
Closed

create JSON in dwv state.json format from user coordinates #1366

roshtha opened this issue May 15, 2023 · 4 comments
Labels
question Further information is requested
Milestone

Comments

@roshtha
Copy link

roshtha commented May 15, 2023

Hello all,

I have an AI service through which I get annotation coordinates for medical images. Now I want to create dwv JSON format (state.json) out of these annotation coordinates for rendering the annotation rectangular boxes on images. I know about JSON-java libraries through which I can create the required JSON format, store it in the database, and render annotation on images by loading state.json in the dwv image viewer. But I would like to know if any other approach or libraries dwv provides for creating the state.json format from user data.

Thanks.

@ivmartel ivmartel added the question Further information is requested label May 16, 2023
@ivmartel ivmartel added this to the 0.32.0 milestone May 16, 2023
@ivmartel
Copy link
Owner

If you are looking for a utility that takes, for example, a point list and creates the state file, dwv does not provide such a tool.
As a side note, not sure if it can interest you, dwv supports loading DICOM Seg files (image representation of a segmentation).

@beckmarc
Copy link

@ivmartel DICOM segmentation files would be also suited for this case. For example, we could first use pydicom-seg to create the regions of interest that are outputted by the AI on the backend. Then on the frontend we could load the dicom seg files into the dwv viewer as well. However, I couldn't find any example or any method in the documentation on how to load segmentation files into the DWV.

Would be very kind if you could show us how to load DICOM seg files and display them. Is there also the possibility to toggle the segmentation file on and off ?

@ivmartel
Copy link
Owner

Segmentation files are loaded like any other DICOM file. The code will switch according to modality and load the SEG into an Image. The difference being that pixels with intensity 0 are transparent. Just load a base image file and then a SEG one, it should show up in a new layer as an overlay. You can then adjust the transparency of the overlay.

You can find some example data at dicom4qi datasets. The demo viewer allows you to change the transparency of data.

@ivmartel
Copy link
Owner

ivmartel commented Jun 2, 2023

Closing for now, feel free to comment if you need.

@ivmartel ivmartel closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants