Socket
Socket
Sign inDemoInstall

@orionmd/dcmjs-utils

Package Overview
Dependencies
11
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

src/fix-dicom.js

2

index.js
const dump = require('./src/dump-dicom');
const fix = require('./src/fix-dicom');
module.exports = {
dump,
fix,
};

4

package.json
{
"name": "@orionmd/dcmjs-utils",
"version": "1.1.1",
"version": "1.2.0",
"main": "index.js",

@@ -13,3 +13,3 @@ "license": "MIT",

"dependencies": {
"@orionmd/dcmjs": "^0.11.0",
"@orionmd/dcmjs": "^0.17.0",
"dcmjs": "^0.16.2"

@@ -16,0 +16,0 @@ },

@@ -15,6 +15,10 @@ // const dcmjs = require('dcmjs');

async function getFileDataset(filePath, options = {}) {
const { ignoreErrors, naturalize, untilTag } = options;
const { ignoreErrors, naturalize, untilTag, stopAfterTag } = options;
const fileBuffer = await readFile(filePath);
const fileArrayBuffer = bufferToArrayBuffer(fileBuffer);
const dicomData = dcmjs.data.DicomMessage.readFile(fileArrayBuffer, { ignoreErrors, untilTag });
const dicomData = dcmjs.data.DicomMessage.readFile(fileArrayBuffer, {
ignoreErrors,
untilTag,
stopAfterTag,
});
let dataset = dicomData.dict;

@@ -42,3 +46,10 @@ let { meta } = dicomData;

async function dump(options = {}) {
const { path: dumpPath, pattern, ignoreErrors, naturalize = true, untilTag } = options;
const {
path: dumpPath,
pattern,
ignoreErrors,
naturalize = true,
untilTag,
stopAfterTag,
} = options;

@@ -59,3 +70,8 @@ // check if path is a directory

filePath,
dataset: await getFileDataset(filePath, { ignoreErrors, naturalize, untilTag }),
dataset: await getFileDataset(filePath, {
ignoreErrors,
naturalize,
untilTag,
stopAfterTag,
}),
};

@@ -72,5 +88,5 @@ } catch (err) {

}
return getFileDataset(dumpPath, { ignoreErrors, naturalize, untilTag });
return getFileDataset(dumpPath, { ignoreErrors, naturalize, untilTag, stopAfterTag });
}
module.exports = dump;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc