kfb-view 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/workspace.xml +71 -59
- package/config/webpack.dev.conf.js +1 -1
- package/example/index.js +46 -9
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/area/index.js +0 -1
- package/src/components/tailoring/index.js +10 -4
- package/src/view.js +4 -0
package/.idea/workspace.xml
CHANGED
|
@@ -37,17 +37,10 @@
|
|
|
37
37
|
</component>
|
|
38
38
|
<component name="ChangeListManager">
|
|
39
39
|
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
|
|
40
|
-
<change afterPath="$PROJECT_DIR$/example/label/check.svg" afterDir="false" />
|
|
41
|
-
<change afterPath="$PROJECT_DIR$/example/label/check_empty.svg" afterDir="false" />
|
|
42
|
-
<change afterPath="$PROJECT_DIR$/example/label/cross.svg" afterDir="false" />
|
|
43
|
-
<change afterPath="$PROJECT_DIR$/example/label/cross_empty.svg" afterDir="false" />
|
|
44
|
-
<change afterPath="$PROJECT_DIR$/example/label/delete.svg" afterDir="false" />
|
|
45
|
-
<change afterPath="$PROJECT_DIR$/example/label/delete_empty.svg" afterDir="false" />
|
|
46
|
-
<change afterPath="$PROJECT_DIR$/example/label/hasAudit.svg" afterDir="false" />
|
|
47
40
|
<change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
|
|
48
41
|
<change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
|
|
49
|
-
<change beforePath="$PROJECT_DIR$/
|
|
50
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
42
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
43
|
+
<change beforePath="$PROJECT_DIR$/src/components/tailoring/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/tailoring/index.js" afterDir="false" />
|
|
51
44
|
</list>
|
|
52
45
|
<option name="SHOW_DIALOG" value="false" />
|
|
53
46
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -83,22 +76,22 @@
|
|
|
83
76
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
84
77
|
<option name="showLibraryContents" value="true" />
|
|
85
78
|
</component>
|
|
86
|
-
<component name="PropertiesComponent"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
79
|
+
<component name="PropertiesComponent">{
|
|
80
|
+
"keyToString": {
|
|
81
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
82
|
+
"Project.color": "4c401d",
|
|
83
|
+
"WebServerToolWindowFactoryState": "false",
|
|
84
|
+
"dart.analysis.tool.window.visible": "false",
|
|
85
|
+
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
|
|
86
|
+
"node.js.detected.package.eslint": "true",
|
|
87
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
88
|
+
"nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
|
|
89
|
+
"nodejs_package_manager_path": "npm",
|
|
90
|
+
"settings.editor.selected.configurable": "settings.nodejs",
|
|
91
|
+
"ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
|
|
92
|
+
"vue.rearranger.settings.migration": "true"
|
|
100
93
|
}
|
|
101
|
-
}
|
|
94
|
+
}</component>
|
|
102
95
|
<component name="RecentsManager">
|
|
103
96
|
<key name="CopyFile.RECENT_KEYS">
|
|
104
97
|
<recent name="$PROJECT_DIR$/example" />
|
|
@@ -365,35 +358,26 @@
|
|
|
365
358
|
<workItem from="1664237971278" duration="500000" />
|
|
366
359
|
<workItem from="1664521013893" duration="3516000" />
|
|
367
360
|
<workItem from="1664527271315" duration="101000" />
|
|
368
|
-
<workItem from="1666923133420" duration="
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
<
|
|
372
|
-
<
|
|
373
|
-
<
|
|
374
|
-
<
|
|
375
|
-
<
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
<
|
|
379
|
-
<
|
|
380
|
-
<
|
|
381
|
-
<
|
|
382
|
-
<
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
<
|
|
386
|
-
<
|
|
387
|
-
<
|
|
388
|
-
<option name="project" value="LOCAL" />
|
|
389
|
-
<updated>1650967323558</updated>
|
|
390
|
-
</task>
|
|
391
|
-
<task id="LOCAL-00062" summary="优化加载速度">
|
|
392
|
-
<created>1651037514502</created>
|
|
393
|
-
<option name="number" value="00062" />
|
|
394
|
-
<option name="presentableId" value="LOCAL-00062" />
|
|
395
|
-
<option name="project" value="LOCAL" />
|
|
396
|
-
<updated>1651037514503</updated>
|
|
361
|
+
<workItem from="1666923133420" duration="7628000" />
|
|
362
|
+
<workItem from="1666938040394" duration="124000" />
|
|
363
|
+
<workItem from="1666938888266" duration="914000" />
|
|
364
|
+
<workItem from="1666940059058" duration="598000" />
|
|
365
|
+
<workItem from="1667175003009" duration="594000" />
|
|
366
|
+
<workItem from="1667184664626" duration="1313000" />
|
|
367
|
+
<workItem from="1667201967516" duration="2489000" />
|
|
368
|
+
<workItem from="1667268688798" duration="1219000" />
|
|
369
|
+
<workItem from="1667284578069" duration="184000" />
|
|
370
|
+
<workItem from="1667375142206" duration="2786000" />
|
|
371
|
+
<workItem from="1667378801635" duration="594000" />
|
|
372
|
+
<workItem from="1667393411315" duration="590000" />
|
|
373
|
+
<workItem from="1667434716150" duration="280000" />
|
|
374
|
+
<workItem from="1667617108891" duration="2574000" />
|
|
375
|
+
<workItem from="1667627800845" duration="112000" />
|
|
376
|
+
<workItem from="1667787899066" duration="98000" />
|
|
377
|
+
<workItem from="1668850189781" duration="655000" />
|
|
378
|
+
<workItem from="1668991614733" duration="532000" />
|
|
379
|
+
<workItem from="1668992196461" duration="1190000" />
|
|
380
|
+
<workItem from="1669545429121" duration="316000" />
|
|
397
381
|
</task>
|
|
398
382
|
<task id="LOCAL-00063" summary="2.1.17">
|
|
399
383
|
<created>1651037523261</created>
|
|
@@ -710,7 +694,35 @@
|
|
|
710
694
|
<option name="project" value="LOCAL" />
|
|
711
695
|
<updated>1666926343036</updated>
|
|
712
696
|
</task>
|
|
713
|
-
<
|
|
697
|
+
<task id="LOCAL-00108" summary="优化速度">
|
|
698
|
+
<created>1666937547422</created>
|
|
699
|
+
<option name="number" value="00108" />
|
|
700
|
+
<option name="presentableId" value="LOCAL-00108" />
|
|
701
|
+
<option name="project" value="LOCAL" />
|
|
702
|
+
<updated>1666937547423</updated>
|
|
703
|
+
</task>
|
|
704
|
+
<task id="LOCAL-00109" summary="2.3.3">
|
|
705
|
+
<created>1666937564499</created>
|
|
706
|
+
<option name="number" value="00109" />
|
|
707
|
+
<option name="presentableId" value="LOCAL-00109" />
|
|
708
|
+
<option name="project" value="LOCAL" />
|
|
709
|
+
<updated>1666937564500</updated>
|
|
710
|
+
</task>
|
|
711
|
+
<task id="LOCAL-00110" summary="解决标注时鼠标右键和左键同时点击时,移动异常">
|
|
712
|
+
<created>1667617934430</created>
|
|
713
|
+
<option name="number" value="00110" />
|
|
714
|
+
<option name="presentableId" value="LOCAL-00110" />
|
|
715
|
+
<option name="project" value="LOCAL" />
|
|
716
|
+
<updated>1667617934430</updated>
|
|
717
|
+
</task>
|
|
718
|
+
<task id="LOCAL-00111" summary="2.3.4">
|
|
719
|
+
<created>1667618110588</created>
|
|
720
|
+
<option name="number" value="00111" />
|
|
721
|
+
<option name="presentableId" value="LOCAL-00111" />
|
|
722
|
+
<option name="project" value="LOCAL" />
|
|
723
|
+
<updated>1667618110588</updated>
|
|
724
|
+
</task>
|
|
725
|
+
<option name="localTasksCounter" value="112" />
|
|
714
726
|
<servers />
|
|
715
727
|
</component>
|
|
716
728
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -752,10 +764,6 @@
|
|
|
752
764
|
<component name="VcsManagerConfiguration">
|
|
753
765
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
754
766
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
755
|
-
<MESSAGE value="2.2.1" />
|
|
756
|
-
<MESSAGE value="index.js" />
|
|
757
|
-
<MESSAGE value="导航轨迹显示" />
|
|
758
|
-
<MESSAGE value="刻度线显示" />
|
|
759
767
|
<MESSAGE value="2.2.2" />
|
|
760
768
|
<MESSAGE value="增加网格线和标尺" />
|
|
761
769
|
<MESSAGE value="标注信息优化显示" />
|
|
@@ -777,7 +785,11 @@
|
|
|
777
785
|
<MESSAGE value="2.3.1" />
|
|
778
786
|
<MESSAGE value="优化渲染速度" />
|
|
779
787
|
<MESSAGE value="2.3.2" />
|
|
780
|
-
<
|
|
788
|
+
<MESSAGE value="优化速度" />
|
|
789
|
+
<MESSAGE value="2.3.3" />
|
|
790
|
+
<MESSAGE value="解决标注时鼠标右键和左键同时点击时,移动异常" />
|
|
791
|
+
<MESSAGE value="2.3.4" />
|
|
792
|
+
<option name="LAST_COMMIT_MESSAGE" value="2.3.4" />
|
|
781
793
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
782
794
|
</component>
|
|
783
795
|
<component name="XSLT-Support.FileAssociations.UIState">
|
|
@@ -66,7 +66,7 @@ module.exports = function() {
|
|
|
66
66
|
// target: 'http://gastric.label.hzztai.com/',
|
|
67
67
|
// target: 'http://192.168.1.91:7007',
|
|
68
68
|
// target: 'http://192.168.1.91',
|
|
69
|
-
target: 'http://192.168.1.
|
|
69
|
+
target: 'http://192.168.1.22',
|
|
70
70
|
// target: 'https://tct.hzztai.com',
|
|
71
71
|
// target: 'https://pis-ningbo.hzztai.com',
|
|
72
72
|
// target: 'https://pis-test.hzztai.com',
|
package/example/index.js
CHANGED
|
@@ -25,12 +25,12 @@ deleteEmptyImg.src = deleteEmptySvg;
|
|
|
25
25
|
const hasAuditImg = new Image();
|
|
26
26
|
hasAuditImg.src = hasAuditSvg;
|
|
27
27
|
|
|
28
|
-
const fileName = '
|
|
28
|
+
const fileName = 'uploads/TCT/已入库/guangzhou_fuer_hospital/pos/labeling/LSIL/MY22004_other_2022-08-22_LSIL_切片2.kfb';
|
|
29
29
|
|
|
30
30
|
const instance = axios.create({
|
|
31
31
|
baseURL: '/api',
|
|
32
32
|
timeout: 1000,
|
|
33
|
-
headers: {'Authorization': 'bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
|
|
33
|
+
headers: {'Authorization': 'bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjIyL2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjY3NjE2OTIyLCJleHAiOjE2Njc2NTUzMjIsIm5iZiI6MTY2NzYxNjkyMiwianRpIjoiMDl4SEZMdlpHUlliVExlQyIsInN1YiI6MjcsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.buNwEIsNSqo1-wH8zEaRyjauIVKOXmjJfjaa1-g9l_k'},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
let cacheImage = {};
|
|
@@ -304,7 +304,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
304
304
|
kv.board.startDraw({
|
|
305
305
|
tool: KfbView.marks.RECTANGLE,
|
|
306
306
|
isROI: false,
|
|
307
|
-
once: true,
|
|
308
307
|
measure: true,
|
|
309
308
|
});
|
|
310
309
|
};
|
|
@@ -373,9 +372,9 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
373
372
|
console.log(e);
|
|
374
373
|
});*/
|
|
375
374
|
kv.$on(KfbView.events.EVENT_END_PAINTING, (e) => {
|
|
376
|
-
console.
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
console.time('appendLabelList');
|
|
376
|
+
kv.appendLabelList([e.detail]);
|
|
377
|
+
console.timeEnd('appendLabelList');
|
|
379
378
|
// kv.board.endDraw();
|
|
380
379
|
});
|
|
381
380
|
kv.$on(KfbView.events.EVENT_DELETE_LABEL, (e) => {
|
|
@@ -438,7 +437,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
438
437
|
}
|
|
439
438
|
|
|
440
439
|
instance.get(
|
|
441
|
-
`/image_annotation?file=${fileName}&slide_label_id=
|
|
440
|
+
`/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
|
|
442
441
|
then(({data}) => {
|
|
443
442
|
data = data.data;
|
|
444
443
|
const labelRegionList = [];
|
|
@@ -451,7 +450,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
451
450
|
tool: (item.type || item.tool) === 'Spline' ?
|
|
452
451
|
'Polygon' :
|
|
453
452
|
(item.type || item.tool),
|
|
454
|
-
strokeStyle: `#${item.color.toString(16).
|
|
453
|
+
strokeStyle: item.strokeStyle || `#${item.color.toString(16).
|
|
455
454
|
slice(2)}${item.color.toString(16).slice(0, 2)}`,
|
|
456
455
|
measure: true,
|
|
457
456
|
sub_class: subClass,
|
|
@@ -469,10 +468,48 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
469
468
|
...r,
|
|
470
469
|
});
|
|
471
470
|
});
|
|
471
|
+
console.time('initLabelList');
|
|
472
472
|
kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
|
|
473
|
+
console.timeEnd('initLabelList');
|
|
473
474
|
});
|
|
474
475
|
document.querySelector('#reDraw').addEventListener('click', () => {
|
|
475
|
-
|
|
476
|
+
instance.get(
|
|
477
|
+
`/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
|
|
478
|
+
then(({data}) => {
|
|
479
|
+
data = data.data;
|
|
480
|
+
const labelRegionList = [];
|
|
481
|
+
(data || []).filter(item => item.id && item.region.width > 0).
|
|
482
|
+
forEach(item => {
|
|
483
|
+
const subClass = item.sub_class || item.subClass;
|
|
484
|
+
const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
|
|
485
|
+
const r = {
|
|
486
|
+
...item,
|
|
487
|
+
tool: (item.type || item.tool) === 'Spline' ?
|
|
488
|
+
'Polygon' :
|
|
489
|
+
(item.type || item.tool),
|
|
490
|
+
strokeStyle: item.strokeStyle || `#${item.color.toString(16).
|
|
491
|
+
slice(2)}${item.color.toString(16).slice(0, 2)}`,
|
|
492
|
+
measure: true,
|
|
493
|
+
sub_class: subClass,
|
|
494
|
+
isROI: subClass === 'ROI',
|
|
495
|
+
isClose: item.isClose || item.is_close,
|
|
496
|
+
lineWidth: item.lineWidth || item.width,
|
|
497
|
+
text: item.text || item.description,
|
|
498
|
+
is_ai,
|
|
499
|
+
ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
|
|
500
|
+
ai_points: is_ai ? (item.ai_points ?? item.points) : '',
|
|
501
|
+
ai_region: is_ai ? (item.ai_region ?? item.region) : '',
|
|
502
|
+
};
|
|
503
|
+
r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1,
|
|
504
|
+
-1);
|
|
505
|
+
labelRegionList.push({
|
|
506
|
+
...r,
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
console.time('initLabelList');
|
|
510
|
+
kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
|
|
511
|
+
console.timeEnd('initLabelList');
|
|
512
|
+
});
|
|
476
513
|
});
|
|
477
514
|
});
|
|
478
515
|
|