Comparing version 0.18.6 to 0.18.7
{ | ||
"name": "dcmjs", | ||
"version": "0.18.6", | ||
"version": "0.18.7", | ||
"description": "Javascript implementation of DICOM manipulation", | ||
@@ -5,0 +5,0 @@ "main": "build/dcmjs.js", |
@@ -273,2 +273,24 @@ const expect = require("chai").expect; | ||
test_fragment_multiframe: () => { | ||
const url = | ||
"https://github.com/dcmjs-org/data/releases/download/encapsulation/encapsulation-fragment-multiframe.dcm"; | ||
const dcmPath = path.join(os.tmpdir(), "encapsulation-fragment-multiframe.dcm"); | ||
downloadToFile(url, dcmPath).then(() => { | ||
const file = fs.readFileSync(dcmPath); | ||
const dicomData = dcmjs.data.DicomMessage.readFile(file.buffer, { | ||
// ignoreErrors: true, | ||
}); | ||
const dataset = dcmjs.data.DicomMetaDictionary.naturalizeDataset( | ||
dicomData.dict | ||
); | ||
// eslint-disable-next-line no-underscore-dangle | ||
dataset._meta = dcmjs.data.DicomMetaDictionary.namifyDataset( | ||
dicomData.meta | ||
); | ||
expect(dataset.NumberOfFrames).to.equal(2); | ||
console.log("Finished test_fragment_multiframe"); | ||
}); | ||
}, | ||
test_null_number_vrs: () => { | ||
@@ -275,0 +297,0 @@ const dicomDict = new DicomDict({ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
10034042
37152