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

feat(Redaction): redaction tool added for Stack and Volume Viewports #1072

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Haasha
Copy link

@Haasha Haasha commented Feb 11, 2024

Context

This PR covers two main things:

  • Addition of a RedactionTool which covers all types of viewports i.e., StackViewport, VolumeViewport. Eventually would also provide support for VideoViewport if needed.
  • Annotation for complete series rather than a Slice. For Example: All dicom files have hospital name or something embedded on the image which need to be redacted using the tool. The current functionality supports creating separate annotation on each slice/imageId of a complete series which is very difficult to manage. This PR would enable users to create a single annotation and render it on a range of images of a series

Changes & Results

  • Added a new tool called RedactionTool.
    • frameRange(optional) field added to Annotation in /tools/src/types/AnnotationTypes.ts
  • annotationFrameRange updated to support for StackViewport/VolumeViewport using the following methods: setStackFrameRange, getStackFrameRange, removeStackFrameRange.
  • filterAnnotationForDisplay updated to fetch frameRange if it exists on annotation and render if currentImageIdIndex of viewport lies within the range.
  • stackAnnotationSeriesTools added in /tools/examples.

Testing

Run Example stackAnnotationSeriesTools to test it out. Any annotation drawn is visible on complete series.

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the

    semantic-release format and guidelines.

Code

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • OS: Windows 10 with WSL (Ubuntu)
  • Node version: 16.14.0
  • Browser: Chrome 121.0.6167.161

Copy link

netlify bot commented Feb 11, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit cfcd0b5
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/65c91720106e19000812747d
😎 Deploy Preview https://deploy-preview-1072--cornerstone-3d-docs.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.

@sedghi
Copy link
Member

sedghi commented Feb 15, 2024

Addition of a RedactionTool which covers all types of viewports i.e., StackViewport, VolumeViewport. Eventually would also provide support for VideoViewport if needed.

We already have a redaction tool, can you please clarify what is different here? https://www.cornerstonejs.org/live-examples/videotools

Maybe you want to augment that one to support other viewports?

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.

2 participants