Skip to content

Commit

Permalink
fix bug for XMLHttpRequest, PatientName; improve function decodeImage…
Browse files Browse the repository at this point in the history
…Frame
  • Loading branch information
birdeggb2777 committed Jan 18, 2025
1 parent 42b4529 commit eb63a99
Show file tree
Hide file tree
Showing 7 changed files with 3,515 additions and 14 deletions.
5 changes: 3 additions & 2 deletions bluelight/html/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
<script src="../scripts/external/cornerstone/dicomParser.js" async></script>
<script src="../scripts/external/cornerstone/dataDictionary.js"></script>

<script type="module">
<script src="../scripts/external/cornerstone/decode/decodeImageFrame2.js"></script>
<!--<script type="module">
import { decodeImageFrame } from "../scripts/external/cornerstone/decode/decodeImageFrame.js";
window.decodeImage = decodeImageFrame;
</script>
</script>-->

<script src="../scripts/onload.js"></script>
<script src="../scripts/patient.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion bluelight/scripts/dicomloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function getDefaultImageObj(dataSet, type, url) {
imageObj.PatientID = dataSet.string('x00100020');

//imageObj.PatientName = dataSet.string('x00100010');
imageObj.PatientName = (new TextDecoder('utf-8')).decode(new Uint8Array(dataSet.byteArray.buffer, dataSet.elements[Tag.PatientName].dataOffset, dataSet.elements[Tag.PatientName].length));
if(dataSet.elements[Tag.PatientName])
imageObj.PatientName = (new TextDecoder('utf-8')).decode(new Uint8Array(dataSet.byteArray.buffer, dataSet.elements[Tag.PatientName].dataOffset, dataSet.elements[Tag.PatientName].length));

imageObj.patentSex = dataSet.string('x00100040');
imageObj.pixelRepresentation = dataSet.int16('x00280103');
Expand Down
Loading

0 comments on commit eb63a99

Please sign in to comment.