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(lossless-round-trip): Implement lossless read writes #400

Merged
merged 18 commits into from
Aug 19, 2024

Conversation

craigberry1
Copy link
Contributor

Solves #398 by implementing lossless round trip read/writes to preserve original file data when tags are unmodified

  • Extracts any formatting or manipulation done to data element values into ValueRepresentation.applyFormatting
  • Maintain reference to original value via new _rawValue property on a data element
  • Detect changes to Value during writes to determine whether to maintain original unformatted value or update
  • Filter BinaryValueRepresentation from lossless processing by default to avoid duplicating large arrayBuffers like pixel data, but provide override mechanism via readOptions

Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for dcmjs2 ready!

Name Link
🔨 Latest commit 9b0ad2c
🔍 Latest deploy log https://app.netlify.com/sites/dcmjs2/deploys/66bfc92a03ebfd0008257046
😎 Deploy Preview https://deploy-preview-400--dcmjs2.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.

Copy link
Collaborator

@pieper pieper left a comment

Choose a reason for hiding this comment

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

Thanks for working on this 👍

Other than the one possible missing test it looks good to me and we can merge.

test/data.test.js Show resolved Hide resolved
src/ValueRepresentation.js Show resolved Hide resolved
@pieper pieper merged commit faa0f86 into dcmjs-org:master Aug 19, 2024
13 checks passed
Copy link

🎉 This PR is included in version 0.34.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants