Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit 2a2e6bb

Browse files
authored
fix(wado/retrieveMetadata.js): Handle changes to dicomweb-client Bulk Data retrieval for Palette Color images (#18)
Previous versions of dicomweb-client retrieved BulkData as a single entry, when the result should be provided as an array (the split-up entries of the multipart response). This change just takes the first entry of the split-up multipart response when handling Palette Color images.
1 parent 32fe978 commit 2a2e6bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/studies/services/wado/retrieveMetadata.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ function getPaletteColor(server, instance, tag, lutDescriptor) {
164164
return byteArray[position] + byteArray[position + 1] * 256;
165165
};
166166

167-
const arrayBufferToPaletteColorLUT = arraybuffer => {
168-
const byteArray = new Uint8Array(arraybuffer);
169-
const lut = [];
167+
const arrayBufferToPaletteColorLUT = result => {
168+
const arraybuffer = result[0]
169+
const byteArray = new Uint8Array(arraybuffer)
170+
const lut = []
170171

171172
for (let i = 0; i < numLutEntries; i++) {
172173
if (bits === 16) {

0 commit comments

Comments
 (0)