Skip to content

fix(datasetToBlob): Allow dataset._meta to be omitted #428

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tsondergaard
Copy link

Without this it is necessary to add report.dataset._meta = {} before you can write a derived dataset like StructuredReport to part10 format:

const obj = await readFile("obj.dcm");
const dicom_data = dcmjs.data.DicomMessage.readFile(obj.buffer);
const report = new dcmjs.derivations.StructuredReport([dicom_data]);
report.dataset._meta = {}; // <-- Fix the need for this!
const buffer = dcmjs.data.datasetToDict(report.dataset).write();

Without this it is necessary to add report.dataset._meta = {} before
you can write a derived dataset like StructuredReport to part10
format:

    const obj = await readFile("obj.dcm");
    const dicom_data = dcmjs.data.DicomMessage.readFile(obj.buffer);
    const report = new dcmjs.derivations.StructuredReport([dicom_data]);
    report.dataset._meta = {}; // <-- Fix the need for this!
    const buffer = dcmjs.data.datasetToDict(report.dataset).write();
Copy link

netlify bot commented Mar 27, 2025

Deploy Preview for dcmjs2 ready!

Name Link
🔨 Latest commit 6fd2e1d
🔍 Latest deploy log https://app.netlify.com/sites/dcmjs2/deploys/67e559b8c1ea8d00087b5a73
😎 Deploy Preview https://deploy-preview-428--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.

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