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

Convert a loaded image to segment group #528

Merged

Conversation

jadh4v
Copy link
Collaborator

@jadh4v jadh4v commented Dec 1, 2023

Convert a loaded image into a labelmap / segment group.
Choosing this option will remove the image from the list of loaded datasets, and create a new segment group under annotations tab using the image as a segmentation/labelmap.
This operation can fail if the segmentation image does not match the bounds of the selected primary image (base image on which the segmentation is to be applied).

WIP, additional points that need fixing:

Snapshots

image image

Copy link

netlify bot commented Dec 1, 2023

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 37e7622
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/65848e40e1cbb60008e06043
😎 Deploy Preview https://deploy-preview-528--volview-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jadh4v jadh4v requested review from floryst and PaulHax December 1, 2023 20:50
@PaulHax
Copy link
Collaborator

PaulHax commented Dec 2, 2023

Good stuff.

What do you think about having an "Add segmentation group from loaded image" button under the Annotation Tab->Segment Groups?

After removing the converted image from the Data Browser how can I:

  • "undo" the conversion if I clicked mistakenly
  • load the converted image as the "primary" image?

@jadh4v
Copy link
Collaborator Author

jadh4v commented Dec 3, 2023

Good stuff.

What do you think about having an "Add segmentation group from loaded image" button under the Annotation Tab->Segment Groups?

After removing the converted image from the Data Browser how can I:

  • "undo" the conversion if I clicked mistakenly
  • load the converted image as the "primary" image?

Current way to undo is to simply delete the segment group and re-open the file as image again. Do you think it is a frequent use-case to go back-and-forth between image and labelmap representations?

Yes, we can also add the option "Add segmentation group from loaded image" in the annotations tab. I will add that.

@floryst
Copy link
Collaborator

floryst commented Dec 5, 2023

Current way to undo is to simply delete the segment group and re-open the file as image again. Do you think it is a frequent use-case to go back-and-forth between image and labelmap representations?

I don't think there is much of a reason to have a dedicated undo functionality yet. Let's get one direction working and then we can add the other direction when there is sufficient interest/reason to do so.

@jadh4v jadh4v changed the title WIP feat(SEG): convert a loaded image to labelmap/segmentGroup Convert a loaded image to labelmap/segmentGroup Dec 6, 2023
@jadh4v jadh4v force-pushed the ENH-convert-image-to-labelmap-segment-group branch from 193206a to f79e361 Compare December 13, 2023 22:57
@jadh4v jadh4v changed the title Convert a loaded image to labelmap/segmentGroup Convert a loaded image to segment group Dec 13, 2023
@jadh4v jadh4v force-pushed the ENH-convert-image-to-labelmap-segment-group branch from f79e361 to b2850fa Compare December 13, 2023 23:11
@jadh4v jadh4v marked this pull request as ready for review December 13, 2023 23:11
Copy link
Collaborator

@PaulHax PaulHax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DICOM Seg images make sense to convert to segment groups yeah? I guess we should just recongize that DICOM Seg objects have a base DICOM image and we just apply them to that image automatily? Is it common for this metadata matchup to fail and it would be useful to allow user to convert manually?

src/components/ImageDataBrowser.vue Outdated Show resolved Hide resolved
src/components/SegmentGroupControls.vue Outdated Show resolved Hide resolved
src/components/SegmentGroupControls.vue Outdated Show resolved Hide resolved
src/components/SegmentGroupControls.vue Outdated Show resolved Hide resolved
src/components/SegmentGroupControls.vue Outdated Show resolved Hide resolved
@jadh4v
Copy link
Collaborator Author

jadh4v commented Dec 20, 2023

DICOM Seg images make sense to convert to segment groups yeah? I guess we should just recongize that DICOM Seg objects have a base DICOM image and we just apply them to that image automatily? Is it common for this metadata matchup to fail and it would be useful to allow user to convert manually?

I think we can address this when working on explicitly handling SEG DICOM objects (basically when implementing the automatic part).

@jadh4v jadh4v force-pushed the ENH-convert-image-to-labelmap-segment-group branch from 06edd6a to 857585c Compare December 21, 2023 18:48
@jadh4v jadh4v force-pushed the ENH-convert-image-to-labelmap-segment-group branch from 857585c to 37e7622 Compare December 21, 2023 19:13
@PaulHax
Copy link
Collaborator

PaulHax commented Dec 21, 2023

Works good. Good to merge?

@jadh4v
Copy link
Collaborator Author

jadh4v commented Dec 22, 2023

Works good. Good to merge?

Yes, please merge. No further changes in queue.

@PaulHax PaulHax added this pull request to the merge queue Dec 23, 2023
Merged via the queue into Kitware:main with commit 5bf99ee Dec 23, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants