uat_us
parent
ff7305c3a0
commit
d25fd68db7
|
@ -90,7 +90,7 @@
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<DicomTags :image-data="imageData" @close="dcmTag.visible = false" />
|
<DicomTags :imageId="stack.imageIds[stack.currentImageIdIndex]" @close="dcmTag.visible = false" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -176,8 +176,7 @@ export default {
|
||||||
markers: { top: '', right: '', bottom: '', left: '' },
|
markers: { top: '', right: '', bottom: '', left: '' },
|
||||||
orientationMarkers: [],
|
orientationMarkers: [],
|
||||||
originalMarkers: [],
|
originalMarkers: [],
|
||||||
dcmTag: { visible: false, title: 'DICOM Tags' },
|
dcmTag: { visible: false, title: 'DICOM Tags' }
|
||||||
imageData: null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -761,11 +760,7 @@ export default {
|
||||||
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
||||||
},
|
},
|
||||||
showTags() {
|
showTags() {
|
||||||
var image = cornerstone.getImage(this.canvas)
|
|
||||||
// var dataSet = dicomParser.parseDicom(image.data.byteArray)
|
|
||||||
// console.log('showTags', dataSet)
|
|
||||||
this.dcmTag.visible = true
|
this.dcmTag.visible = true
|
||||||
this.imageData = image.data
|
|
||||||
},
|
},
|
||||||
fitToWindow() {
|
fitToWindow() {
|
||||||
if (this.stack.seriesNumber) {
|
if (this.stack.seriesNumber) {
|
||||||
|
|
|
@ -54,15 +54,14 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import TAG_DICT from './dataDictionary'
|
import TAG_DICT from './dataDictionary'
|
||||||
|
import * as cornerstone from 'cornerstone-core'
|
||||||
import dicomParser from 'dicom-parser'
|
import dicomParser from 'dicom-parser'
|
||||||
export default {
|
export default {
|
||||||
name: 'DicomTags',
|
name: 'DicomTags',
|
||||||
props: {
|
props: {
|
||||||
imageData: {
|
imageId: {
|
||||||
type: Object,
|
type: String,
|
||||||
default() {
|
required: true
|
||||||
return []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -72,8 +71,9 @@ export default {
|
||||||
search: ''
|
search: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
var dataSet = dicomParser.parseDicom(this.imageData.byteArray)
|
let image = await cornerstone.loadAndCacheImage(this.imageId)
|
||||||
|
var dataSet = dicomParser.parseDicom(image.data.byteArray)
|
||||||
var output = []
|
var output = []
|
||||||
this.dumpDataSet(dataSet, output)
|
this.dumpDataSet(dataSet, output)
|
||||||
this.list = output
|
this.list = output
|
||||||
|
@ -95,7 +95,7 @@ export default {
|
||||||
const tag = this.getTag(element.tag)
|
const tag = this.getTag(element.tag)
|
||||||
elementObject.id = `${this.idx++}${new Date().getTime()}`
|
elementObject.id = `${this.idx++}${new Date().getTime()}`
|
||||||
elementObject.tagCode = element.tag
|
elementObject.tagCode = element.tag
|
||||||
elementObject.tagName = tag.name
|
elementObject.tagName = tag ? tag.name : ''
|
||||||
elementObject.tagLength = element.length
|
elementObject.tagLength = element.length
|
||||||
elementObject.value = ''
|
elementObject.value = ''
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ export default {
|
||||||
exception: err,
|
exception: err,
|
||||||
output: output
|
output: output
|
||||||
}
|
}
|
||||||
throw ex
|
console.log(ex)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTag(tag) {
|
getTag(tag) {
|
||||||
|
|
Loading…
Reference in New Issue