Skip to content

Commit

Permalink
Merge pull request #68 from LinkunGao/release/v1.11.13
Browse files Browse the repository at this point in the history
update
  • Loading branch information
LinkunGao authored Sep 29, 2022
2 parents 05691fc + 3e415ba commit 0a56c5f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/Loader/copperDicomLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as THREE from "three";
import getVOILUT from "../Utils/getVOILUT";
import dicomParser from "dicom-parser";
import { copperVolumeType } from "../types/types";
import { TAG_DICT } from "../lib/dicom_pharser_dictionary";

const loader = new THREE.FileLoader().setResponseType("arraybuffer");

Expand All @@ -13,18 +12,18 @@ export function copperDicomLoader(
loader.load(url, (arrayBuffer) => {
var dicomFileAsBuffer = new Uint8Array(arrayBuffer as ArrayBuffer);

// const dataSet1 = dicomParser.parseDicom(dicomFileAsBuffer);
const dataSet = dicomParser.parseDicom(dicomFileAsBuffer);
// console.log(dataSet1);

const dataSet = dicomParser.parseDicom(dicomFileAsBuffer, {
vrCallback(tag) {
const formatted = `(${tag.substring(1, 5)},${tag.substring(5, 9)})`;
// const dataSet = dicomParser.parseDicom(dicomFileAsBuffer, {
// vrCallback(tag) {
// const formatted = `(${tag.substring(1, 5)},${tag.substring(5, 9)})`;

// console.log(!!TAG_DICT[formatted] ? TAG_DICT[formatted].vr : undefined);
// // console.log(!!TAG_DICT[formatted] ? TAG_DICT[formatted].vr : undefined);

return !!TAG_DICT[formatted] ? TAG_DICT[formatted].vr : undefined;
},
});
// return !!TAG_DICT[formatted] ? TAG_DICT[formatted].vr : undefined;
// },
// });
let tags: any = null;
let w: number;
let h: number;
Expand Down

0 comments on commit 0a56c5f

Please sign in to comment.