
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
The package provides the following:
start_element,
a sequence of raw events with the encoded value
and an end_element event. The JSON Encoder
emits these as bulkdata URLs, but currently
there is no way to use these urls (except parsing
the url and extracting the bulkdata using
offset and length from the url).Other DICOM VRs (OB, OW, OF, OD, UN)
do not provide a way to interpret the data,
i.e. it's just passed on as a byte array, unchanged.There is documentation for the various pieces in the doc directory. Most notably:
Read a DICOM file, produce JSON Model, and print some data:
dicom = require "dicom"
decoder = dicom.decoder {guess_header: true}
encoder = new dicom.json.JsonEncoder()
sink = new dicom.json.JsonSink (err, json) ->
if err
console.log "Error:", err
process.exit 10
print_element json, dicom.tags.PatientID
print_element json, dicom.tags.IssuerOfPatientID
print_element json, dicom.tags.StudyInstanceUID
print_element json, dicom.tags.AccessionNumber
print_element = (json, path...) ->
console.log dicom.json.get_value(json, path...)
require("fs").createReadStream(process.argv[2]).pipe decoder
.pipe encoder
.pipe sink
And the same thing in Javascript:
"use strict";
var dicom = require("dicom");
var decoder = dicom.decoder({
guess_header: true
});
var encoder = new dicom.json.JsonEncoder();
var print_element = function(json, elem) {
console.log(dicom.json.get_value(json, elem));
};
var sink = new dicom.json.JsonSink(function(err, json) {
if (err) {
console.log("Error:", err);
process.exit(10);
}
print_element(json, dicom.tags.PatientID);
print_element(json, dicom.tags.IssuerOfPatientID);
print_element(json, dicom.tags.StudyInstanceUID);
print_element(json, dicom.tags.AccessionNumber);
});
require("fs").createReadStream(process.argv[2]).pipe(decoder).pipe(encoder).pipe(sink);
FAQs
DICOM for node-js
We found that dicom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.