-
Notifications
You must be signed in to change notification settings - Fork 67
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 functionality to convert images to labelmaps #444
Conversation
floryst
commented
Oct 4, 2023
•
edited
Loading
edited
- Improve image space comparison to check physical spacing
- Add support to convert an image to a labelmap for painting
- Update the labelmap store API
- support the aforementioned functionality and future metadata
- explicitly store ordering of labelmaps per image
- Update the UX around layering to instead be accessed via a dropdown menu
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I'm open to workflow suggestions surrounding labelmap conversion. Right now this does not support converting DICOM datasets to labelmaps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geting TypeError when:
- Load Fetus
- Immediately click Annotations tab
When converting image to labelmap, it disapears from DataBrowser. 🥹 No going back?
Nice to have an icon or something indicate when a image is a Layer on another image.
When do we do the great layer and labelmap unification? First step unifies the Labelmap stack on the Annotations tab with the Layers stack on the Rendering tab?
Instead of presenting items at the labelmap level, they should be presented at the paint-color level. Or maybe this should be under the labelmap grouping. That is, if a color appears in a labelmap, it should appear as an item under that labelmap in the annotations tab, and it should be possible to rename, generate a 3D rendering, convert to contour, etc for that specific paint color. The idea is that we're generating objects (annotations) and they can be rendered in different ways in the 2D and 3D views. But things are presented at the object level, not at the labelmap level. |
If you zoom in, those lines do correspond to the thickness of the painted slice.
Good point. The next step is to expose an API that operates at the segmentation level. This is closely related to configurable default segmentation labels (paint labels) and how those affect labelmaps. |
I'll be adding a means of going from labelmap -> image.
Agreed. I can add an icon indicating that an image is a layer. We can worry about indicating which images its a layer of when we need it.
Layer + labelmap unification is more tricky, so we won't touch on it in this work. For one, overlaying other images is a purely rendering thing, while labelmaps are an annotation thing. Their colormap requirements are different (you can edit labelmap colormaps), and same with the opacity. Right now their data models are distinct enough that we should keep them apart. We can revisit this down the line. |
- Add a new onImageDeleted listener to delete labelmaps when the parent image is gone. - Explicitly store labelmap insertion order. - Add new APIs for adding and deleting labelmaps. Existing APIs are preserved.
Instead of comparing image spaces via metadata comparison, we instead check to see that the volume corners are the same (module rotations and flips).
The IsolatedDialog currently stops certain keys from propagating out of the dialog.
ee10b65
to
3b68ef7
Compare
I've added the segment editor. Please try it out and let me know if there are any bugs/basic issues, e.g. the eraser isn't available yet. |
Segment editor is snazy. Basic stuff:
|
Yes, that's a good idea to consider. I'm thinking we can even make opacity be applied per-segment, but I'm not sure how useful that is.
I like that behavior. I'll add it unless we have good reasons to not do such a thing otherewise.
Thanks, will look into it.
This naming is mostly going off of Slicer, where a labelmap is a type of segmentation, and segments are just a particular label. I'm keeping with segments for now to reflect that, but if labels is more intuitive then we can call them labels.
Good point, I haven't considered that. I think I'll try using the label editor UI for the segment editor UI. |
How do you give a name to a ruler, square, or polyline annotation. Much each new name have a new label? Can I have multiple things labeled and painted as "tumor" and yet name each one independently, e.g., tumor 1, tumor big, maybe-its-a-tumor tumor... |
Let's discuss the behaviors for annotation labels, since I think there are some conflicting expectations. |
Updated:
I do not plan on addressing the expected behavior of labels in this PR because this is intended to only be related to labelmaps. |
Update:
@aylward @finetjul how does the following naming seem to you?
Once the naming is locked down, I will begin renaming various parts of VolView to reflect the terminology change. |
Updated:
|
bccd0db
to
4a34db6
Compare
refactor: rename labelmaps to segment groups
I'll probably merge this soon and we can iterate on it after the fact. |