mirror of
https://github.com/leaders-of-digital-9-task/dicom-viewer.git
synced 2024-11-22 02:16:32 +03:00
remove bug
This commit is contained in:
parent
d7e489334d
commit
0c45eb85be
28
index.js
28
index.js
|
@ -32,15 +32,17 @@ app.init({
|
||||||
dataViewConfigs: {'*': [{divId: 'layerGroup0'}]},
|
dataViewConfigs: {'*': [{divId: 'layerGroup0'}]},
|
||||||
tools: tools
|
tools: tools
|
||||||
});
|
});
|
||||||
|
|
||||||
parent.postMessage({'type': 'getDicom', data: ""}, "*")
|
parent.postMessage({'type': 'getDicom', data: ""}, "*")
|
||||||
|
|
||||||
app.addEventListener('load', function () {
|
app.addEventListener('load', function () {
|
||||||
|
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
console.log(postRuler())
|
// console.log(postRuler())
|
||||||
}, 3000)
|
// }, 3000)
|
||||||
|
app.setTool('Draw')
|
||||||
|
app.setDrawShape('Circle')
|
||||||
|
currentframeNumber = 1
|
||||||
|
setFrame(1)
|
||||||
app.getActiveLayerGroup().getActiveDrawLayer().getKonvaStage().addEventListener('mouseup', () => {
|
app.getActiveLayerGroup().getActiveDrawLayer().getKonvaStage().addEventListener('mouseup', () => {
|
||||||
console.log(app.getActiveLayerGroup().getActiveDrawLayer().getKonvaLayer())
|
console.log(app.getActiveLayerGroup().getActiveDrawLayer().getKonvaLayer())
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -439,11 +441,8 @@ schema = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// schema = loadSchema(schema)
|
|
||||||
|
|
||||||
// console.log(schema[0], "0")
|
// console.log(schema[0], "0")
|
||||||
|
|
||||||
|
|
||||||
//app.loadURLs(schema[0])
|
//app.loadURLs(schema[0])
|
||||||
|
|
||||||
|
|
||||||
|
@ -452,26 +451,29 @@ schema = [
|
||||||
// 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323707.dcm',
|
// 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323707.dcm',
|
||||||
// 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323563.dcm'
|
// 'https://raw.githubusercontent.com/ivmartel/dwv/master/tests/data/bbmri-53323563.dcm'
|
||||||
// ])
|
// ])
|
||||||
|
currentframeNumber = 0
|
||||||
function setFrame(frameNumber) {
|
function setFrame(frameNumber) {
|
||||||
var lg = app.getLayerGroupById(0);
|
var lg = app.getLayerGroupById(0);
|
||||||
var vc = lg.getActiveViewLayer().getViewController();
|
var vc = lg.getActiveViewLayer().getViewController();
|
||||||
var index = vc.getCurrentIndex();
|
var index = vc.getCurrentIndex();
|
||||||
var values = index.getValues();
|
var values = index.getValues();
|
||||||
|
pics = schema[1].get(schema[0][frameNumber])
|
||||||
|
schema[1].set(schema[0][currentframeNumber], postDraws())
|
||||||
|
console.log(schema)
|
||||||
values[2] = frameNumber;
|
values[2] = frameNumber;
|
||||||
vc.setCurrentIndex(new dwv.math.Index(values));
|
vc.setCurrentIndex(new dwv.math.Index(values));
|
||||||
loadPictures(
|
loadPictures(
|
||||||
schema[1].get(schema[0][frameNumber])
|
pics
|
||||||
)
|
)
|
||||||
app.setTool('Draw')
|
app.setTool('Draw')
|
||||||
|
currentframeNumber = frameNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadPictures(pictures) {
|
function loadPictures(pictures) {
|
||||||
|
console.log(pictures)
|
||||||
// app.deleteDraws()
|
// app.deleteDraws()
|
||||||
deleteDraws()
|
deleteDraws()
|
||||||
pictures.map((e) => {
|
createDraws({data: pictures})
|
||||||
createDraws(e)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteDraws() {
|
function deleteDraws() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user