fix: widen file information and decode DICOM text encodings
This commit is contained in:
1 parent
a69fdf2e09
commit
b87f8cb961
13 files changed
+279
-33
No files matched your search
@@ -49,6 +49,30 @@ assert.ok(
|
||||
)
|
||||
);
|
||||
assert.ok(!replies[2]?.metadata.some((entry) => entry.tag === "(7FE0,0010)"));
|
||||
self.onmessage({
|
||||
data: {
|
||||
id: 4,
|
||||
mode: "metadata",
|
||||
buffer: fixture(16, {
|
||||
charset: "ISO_IR 192",
|
||||
patientBytes: [0xe3, 0xcd, 0xe3, 0xcf],
|
||||
}),
|
||||
},
|
||||
});
|
||||
assert.equal(replies[3]?.encoding, "windows-1256");
|
||||
assert.ok(replies[3]?.metadata.some((entry) => entry.value === "محمد"));
|
||||
self.onmessage({
|
||||
data: {
|
||||
id: 5,
|
||||
mode: "metadata",
|
||||
buffer: fixture(16, {
|
||||
charset: "WINDOWS-1256",
|
||||
patientBytes: Array.from(new TextEncoder().encode("Иван^Петров")),
|
||||
}),
|
||||
},
|
||||
});
|
||||
assert.equal(replies[4]?.encoding, "utf-8");
|
||||
assert.ok(replies[4]?.metadata.some((entry) => entry.value === "Иван Петров"));
|
||||
console.log(
|
||||
"Production DICOM worker: decode, frame switching and metadata passed"
|
||||
"Production DICOM worker: decode, metadata and text encodings passed"
|
||||
);
|
||||
Reference in new issue
Block a user