7979<script lang="ts">
8080// import cornerstone packages
8181import dicomParser from ' dicom-parser'
82+ import { dicomTags , additionalDicomTags } from ' ./helper/dicomTags'
8283import * as cornerstone from ' @cornerstonejs/core'
8384import * as cornerstoneDICOMImageLoader from ' @cornerstonejs/dicom-image-loader'
8485
@@ -94,8 +95,9 @@ import VipMetadataOverlay from './components/VipMetadataOverlay.vue'
9495import MetadataSidebar from ' ./components/MetadataSidebar.vue'
9596import {
9697 fetchDicomImageData ,
97- findDicomTagByValue ,
98- extractDicomMetadata
98+ findValueByDicomTagDescription ,
99+ extractDicomMetadata ,
100+ getDicomTagDescription
99101} from ' ./helper/extractMetadata'
100102import { DateTime } from ' luxon'
101103import upperFirst from ' lodash-es/upperFirst'
@@ -298,19 +300,19 @@ export default defineComponent({
298300 }
299301
300302 this .vipInformation .patientName = this .dicomImageData .string (
301- findDicomTagByValue (' patientName' )
303+ findValueByDicomTagDescription (' patientName' , dicomTags )
302304 )
303305 this .vipInformation .patientBirthdate = this .dicomImageData .string (
304- findDicomTagByValue (' patientBirthdate' )
306+ findValueByDicomTagDescription (' patientBirthdate' , dicomTags )
305307 )
306308 this .vipInformation .institutionName = this .dicomImageData .string (
307- findDicomTagByValue (' institutionName' )
309+ findValueByDicomTagDescription (' institutionName' , dicomTags )
308310 )
309311 this .vipInformation .instanceCreationDate = this .dicomImageData .string (
310- findDicomTagByValue (' instanceCreationDate' )
312+ findValueByDicomTagDescription (' instanceCreationDate' , dicomTags )
311313 )
312314 this .vipInformation .instanceCreationTime = this .dicomImageData .string (
313- findDicomTagByValue (' instanceCreationTime' )
315+ findValueByDicomTagDescription (' instanceCreationTime' , dicomTags )
314316 )
315317
316318 this .isVipMetadataFetched = true
@@ -337,6 +339,7 @@ export default defineComponent({
337339 const patientInformation = extractDicomMetadata (
338340 this .dicomImageData ,
339341 patientInformationTags ,
342+ dicomTags ,
340343 this .$language .current
341344 )
342345 patientInformation .then ((result ) => {
@@ -355,6 +358,7 @@ export default defineComponent({
355358 const studyInformation = extractDicomMetadata (
356359 this .dicomImageData ,
357360 studyInformationTags ,
361+ dicomTags ,
358362 this .$language .current
359363 )
360364 studyInformation .then ((result ) => {
@@ -373,6 +377,7 @@ export default defineComponent({
373377 const seriesInformation = extractDicomMetadata (
374378 this .dicomImageData ,
375379 seriesInformationTags ,
380+ dicomTags ,
376381 this .$language .current
377382 )
378383 seriesInformation .then ((result ) => {
@@ -393,6 +398,7 @@ export default defineComponent({
393398 const instanceInformation = extractDicomMetadata (
394399 this .dicomImageData ,
395400 instanceInformationTags ,
401+ dicomTags ,
396402 this .$language .current
397403 )
398404 instanceInformation .then ((result ) => {
@@ -414,6 +420,7 @@ export default defineComponent({
414420 const imageInformation = extractDicomMetadata (
415421 this .dicomImageData ,
416422 imageInformationTags ,
423+ dicomTags ,
417424 this .$language .current
418425 )
419426 imageInformation .then ((result ) => {
@@ -449,6 +456,7 @@ export default defineComponent({
449456 const equipmentInformation = extractDicomMetadata (
450457 this .dicomImageData ,
451458 equipmentInformationTags ,
459+ dicomTags ,
452460 this .$language .current
453461 )
454462 equipmentInformation .then ((result ) => {
@@ -475,6 +483,7 @@ export default defineComponent({
475483 const scanningInformation = extractDicomMetadata (
476484 this .dicomImageData ,
477485 scanningInformationTags ,
486+ dicomTags ,
478487 this .$language .current
479488 )
480489 scanningInformation .then ((result ) => {
@@ -493,36 +502,19 @@ export default defineComponent({
493502 const uidsInformation = extractDicomMetadata (
494503 this .dicomImageData ,
495504 uidsInformationTags ,
505+ dicomTags ,
496506 this .$language .current
497507 )
498508 uidsInformation .then ((result ) => {
499509 this .uidsInformation = result
500510 })
501511
502512 // otherInformation
503- const otherInformationTags = [
504- ' specificCharacterSet' ,
505- ' referringPhysicianName' ,
506- ' MR_AcquisitionType' ,
507- ' numberOfAverages' ,
508- ' percentSampling' ,
509- ' percentPhaseFieldOfView' ,
510- ' lowRR_Value' ,
511- ' highRR_Value' ,
512- ' intervalsAcquired' ,
513- ' intervalsRejected' ,
514- ' heartRate' ,
515- ' receiveCoilName' ,
516- ' transmitCoilName' ,
517- ' inPlanePhaseEncodingDirection' ,
518- ' flipAngle' ,
519- ' positionReferenceIndicator' ,
520- ' windowCenter' ,
521- ' windowWidth'
522- ]
513+ const otherInformationTags = getDicomTagDescription (additionalDicomTags )
523514 const otherInformation = extractDicomMetadata (
524515 this .dicomImageData ,
525516 otherInformationTags ,
517+ additionalDicomTags ,
526518 this .$language .current
527519 )
528520 otherInformation .then ((result ) => {
0 commit comments