From 3a20586609d56a90c2aebf88fff11d1f843d1ae3 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 6 Dec 2024 16:34:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Dicom=E5=AD=97=E5=85=B8=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dicom/DicomTags.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/Dicom/DicomTags.vue b/src/components/Dicom/DicomTags.vue index c3f6ec44..734d51ea 100644 --- a/src/components/Dicom/DicomTags.vue +++ b/src/components/Dicom/DicomTags.vue @@ -108,7 +108,7 @@ export default { dumpDataSet(dataSet, output) { try { for (const propertyName in dataSet.elements) { - const elementObject = {} + const elementObject = {} const element = dataSet.elements[propertyName] const tag = this.getTag(element.tag) elementObject.id = `${this.idx++}${new Date().getTime()}` @@ -119,6 +119,9 @@ export default { } else { elementObject.tagCode = tag ? tag.tag : '' elementObject.tagName = tag ? tag.name : '' + if (tag.name === 'PatientName') { + console.log(123) + } } elementObject.tagLength = element.length @@ -174,6 +177,9 @@ export default { } else { if (this.isStringVr(vr)) { const str = dataSet.string(propertyName) + if (elementObject.tagName === 'PatientName') { + console.log(str) + } const stringIsAscii = this.isASCII(str) if (stringIsAscii) { @@ -181,9 +187,10 @@ export default { elementObject.value = str } } else { - if (element.length !== 2 && element.length !== 4) { - // elementObject.value = 'binary data' - } + elementObject.value = dataSet.string(propertyName) + // if (element.length !== 2 && element.length !== 4) { + // // elementObject.value = 'binary data' + // } } } else if (vr === 'US') { let text = dataSet.uint16(propertyName) From 6ecce41b353e4675e16565916e249b200349a6d3 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 6 Dec 2024 16:35:23 +0800 Subject: [PATCH 2/2] 1 --- src/components/Dicom/DicomTags.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/Dicom/DicomTags.vue b/src/components/Dicom/DicomTags.vue index 734d51ea..31e503f2 100644 --- a/src/components/Dicom/DicomTags.vue +++ b/src/components/Dicom/DicomTags.vue @@ -119,9 +119,6 @@ export default { } else { elementObject.tagCode = tag ? tag.tag : '' elementObject.tagName = tag ? tag.name : '' - if (tag.name === 'PatientName') { - console.log(123) - } } elementObject.tagLength = element.length @@ -177,9 +174,6 @@ export default { } else { if (this.isStringVr(vr)) { const str = dataSet.string(propertyName) - if (elementObject.tagName === 'PatientName') { - console.log(str) - } const stringIsAscii = this.isASCII(str) if (stringIsAscii) {