kfb-view 2.4.1 → 2.4.2
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 +145 -113
- package/config/webpack.dev.conf.js +1 -2
- package/example/index.js +51 -94
- package/package.json +1 -1
- package/src/components/shape/index.js +3 -3
- package/lib/kfb-view.js +0 -2
- package/lib/kfb-view.js.LICENSE.txt +0 -9
package/.idea/workspace.xml
CHANGED
|
@@ -39,10 +39,9 @@
|
|
|
39
39
|
</select>
|
|
40
40
|
</component>
|
|
41
41
|
<component name="ChangeListManager">
|
|
42
|
-
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="
|
|
43
|
-
<change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
|
|
44
|
-
<change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
|
|
42
|
+
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="build:3.0.1">
|
|
45
43
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
44
|
+
<change beforePath="$PROJECT_DIR$/src/components/shape/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/shape/index.js" afterDir="false" />
|
|
46
45
|
</list>
|
|
47
46
|
<option name="SHOW_DIALOG" value="false" />
|
|
48
47
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -78,31 +77,32 @@
|
|
|
78
77
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
79
78
|
<option name="showLibraryContents" value="true" />
|
|
80
79
|
</component>
|
|
81
|
-
<component name="PropertiesComponent"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
80
|
+
<component name="PropertiesComponent">{
|
|
81
|
+
"keyToString": {
|
|
82
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
83
|
+
"Project.color": "4c401d",
|
|
84
|
+
"WebServerToolWindowFactoryState": "false",
|
|
85
|
+
"dart.analysis.tool.window.visible": "false",
|
|
86
|
+
"git-widget-placeholder": "master",
|
|
87
|
+
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
|
|
88
|
+
"node.js.detected.package.eslint": "true",
|
|
89
|
+
"node.js.detected.package.tslint": "true",
|
|
90
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
91
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
92
|
+
"nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
|
|
93
|
+
"nodejs_package_manager_path": "npm",
|
|
94
|
+
"settings.editor.selected.configurable": "settings.nodejs",
|
|
95
|
+
"ts.external.directory.path": "/opt/WebStorm/plugins/javascript-impl/jsLanguageServicesImpl/external",
|
|
96
|
+
"vue.rearranger.settings.migration": "true"
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}</component>
|
|
99
99
|
<component name="RecentsManager">
|
|
100
100
|
<key name="CopyFile.RECENT_KEYS">
|
|
101
|
+
<recent name="$PROJECT_DIR$/src/plugin/openseadragon" />
|
|
101
102
|
<recent name="$PROJECT_DIR$/example" />
|
|
102
103
|
<recent name="$PROJECT_DIR$/src/image" />
|
|
103
104
|
<recent name="$PROJECT_DIR$/src/plugin" />
|
|
104
105
|
<recent name="$PROJECT_DIR$/src/components/cache" />
|
|
105
|
-
<recent name="$PROJECT_DIR$/src/components/rotation" />
|
|
106
106
|
</key>
|
|
107
107
|
<key name="MoveFile.RECENT_KEYS">
|
|
108
108
|
<recent name="$PROJECT_DIR$/src/components/grid" />
|
|
@@ -389,84 +389,38 @@
|
|
|
389
389
|
<workItem from="1671501857160" duration="90000" />
|
|
390
390
|
<workItem from="1671751607914" duration="9693000" />
|
|
391
391
|
<workItem from="1671762555964" duration="1197000" />
|
|
392
|
-
<workItem from="1675327241367" duration="
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
<
|
|
396
|
-
<
|
|
397
|
-
<
|
|
398
|
-
<
|
|
399
|
-
<
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
<
|
|
403
|
-
<
|
|
404
|
-
<
|
|
405
|
-
<
|
|
406
|
-
<
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
<
|
|
410
|
-
<
|
|
411
|
-
<
|
|
412
|
-
<
|
|
413
|
-
<
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
<
|
|
417
|
-
<
|
|
418
|
-
<
|
|
419
|
-
<
|
|
420
|
-
<
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
<
|
|
424
|
-
<option name="number" value="00074" />
|
|
425
|
-
<option name="presentableId" value="LOCAL-00074" />
|
|
426
|
-
<option name="project" value="LOCAL" />
|
|
427
|
-
<updated>1657539914133</updated>
|
|
428
|
-
</task>
|
|
429
|
-
<task id="LOCAL-00075" summary="view.js">
|
|
430
|
-
<created>1657540107150</created>
|
|
431
|
-
<option name="number" value="00075" />
|
|
432
|
-
<option name="presentableId" value="LOCAL-00075" />
|
|
433
|
-
<option name="project" value="LOCAL" />
|
|
434
|
-
<updated>1657540107150</updated>
|
|
435
|
-
</task>
|
|
436
|
-
<task id="LOCAL-00076" summary="优化选中点">
|
|
437
|
-
<created>1657588323251</created>
|
|
438
|
-
<option name="number" value="00076" />
|
|
439
|
-
<option name="presentableId" value="LOCAL-00076" />
|
|
440
|
-
<option name="project" value="LOCAL" />
|
|
441
|
-
<updated>1657588323252</updated>
|
|
442
|
-
</task>
|
|
443
|
-
<task id="LOCAL-00077" summary="优化标注图形显示,一次最多绘制5000个点,超过的标注延迟加载">
|
|
444
|
-
<created>1657592781786</created>
|
|
445
|
-
<option name="number" value="00077" />
|
|
446
|
-
<option name="presentableId" value="LOCAL-00077" />
|
|
447
|
-
<option name="project" value="LOCAL" />
|
|
448
|
-
<updated>1657592781786</updated>
|
|
449
|
-
</task>
|
|
450
|
-
<task id="LOCAL-00078" summary="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点">
|
|
451
|
-
<created>1657607397044</created>
|
|
452
|
-
<option name="number" value="00078" />
|
|
453
|
-
<option name="presentableId" value="LOCAL-00078" />
|
|
454
|
-
<option name="project" value="LOCAL" />
|
|
455
|
-
<updated>1657607397044</updated>
|
|
456
|
-
</task>
|
|
457
|
-
<task id="LOCAL-00079" summary="2.20.0">
|
|
458
|
-
<created>1657607434015</created>
|
|
459
|
-
<option name="number" value="00079" />
|
|
460
|
-
<option name="presentableId" value="LOCAL-00079" />
|
|
461
|
-
<option name="project" value="LOCAL" />
|
|
462
|
-
<updated>1657607434015</updated>
|
|
463
|
-
</task>
|
|
464
|
-
<task id="LOCAL-00080" summary="2.2.0">
|
|
465
|
-
<created>1657607449348</created>
|
|
466
|
-
<option name="number" value="00080" />
|
|
467
|
-
<option name="presentableId" value="LOCAL-00080" />
|
|
468
|
-
<option name="project" value="LOCAL" />
|
|
469
|
-
<updated>1657607449348</updated>
|
|
392
|
+
<workItem from="1675327241367" duration="1458000" />
|
|
393
|
+
<workItem from="1675384282016" duration="594000" />
|
|
394
|
+
<workItem from="1675385204348" duration="1462000" />
|
|
395
|
+
<workItem from="1675843622628" duration="4524000" />
|
|
396
|
+
<workItem from="1675848342418" duration="2364000" />
|
|
397
|
+
<workItem from="1675902452322" duration="1711000" />
|
|
398
|
+
<workItem from="1675909040416" duration="1850000" />
|
|
399
|
+
<workItem from="1675923421168" duration="14000" />
|
|
400
|
+
<workItem from="1676430334861" duration="2002000" />
|
|
401
|
+
<workItem from="1676507825692" duration="1801000" />
|
|
402
|
+
<workItem from="1676515560281" duration="597000" />
|
|
403
|
+
<workItem from="1676530835986" duration="1197000" />
|
|
404
|
+
<workItem from="1676621760411" duration="596000" />
|
|
405
|
+
<workItem from="1676679228746" duration="561000" />
|
|
406
|
+
<workItem from="1676680577748" duration="1197000" />
|
|
407
|
+
<workItem from="1676690227544" duration="597000" />
|
|
408
|
+
<workItem from="1676722969064" duration="565000" />
|
|
409
|
+
<workItem from="1678926296962" duration="2385000" />
|
|
410
|
+
<workItem from="1679708561519" duration="550000" />
|
|
411
|
+
<workItem from="1679728741473" duration="161000" />
|
|
412
|
+
<workItem from="1680268962874" duration="1136000" />
|
|
413
|
+
<workItem from="1680271989452" duration="591000" />
|
|
414
|
+
<workItem from="1680437372638" duration="2994000" />
|
|
415
|
+
<workItem from="1680440411212" duration="49000" />
|
|
416
|
+
<workItem from="1680526343598" duration="1856000" />
|
|
417
|
+
<workItem from="1680595613024" duration="557000" />
|
|
418
|
+
<workItem from="1680596301151" duration="1804000" />
|
|
419
|
+
<workItem from="1680740253103" duration="572000" />
|
|
420
|
+
<workItem from="1680746491709" duration="597000" />
|
|
421
|
+
<workItem from="1680750141486" duration="416000" />
|
|
422
|
+
<workItem from="1680834237716" duration="2982000" />
|
|
423
|
+
<workItem from="1680858434486" duration="1053000" />
|
|
470
424
|
</task>
|
|
471
425
|
<task id="LOCAL-00081" summary="加载速度优化">
|
|
472
426
|
<created>1657612318446</created>
|
|
@@ -734,7 +688,84 @@
|
|
|
734
688
|
<option name="project" value="LOCAL" />
|
|
735
689
|
<updated>1675327595052</updated>
|
|
736
690
|
</task>
|
|
737
|
-
<
|
|
691
|
+
<task id="LOCAL-00119" summary="2.4.1">
|
|
692
|
+
<created>1675327616880</created>
|
|
693
|
+
<option name="number" value="00119" />
|
|
694
|
+
<option name="presentableId" value="LOCAL-00119" />
|
|
695
|
+
<option name="project" value="LOCAL" />
|
|
696
|
+
<updated>1675327616880</updated>
|
|
697
|
+
</task>
|
|
698
|
+
<task id="LOCAL-00120" summary="升级openseadragon插件">
|
|
699
|
+
<created>1675919992646</created>
|
|
700
|
+
<option name="number" value="00120" />
|
|
701
|
+
<option name="presentableId" value="LOCAL-00120" />
|
|
702
|
+
<option name="project" value="LOCAL" />
|
|
703
|
+
<updated>1675919992646</updated>
|
|
704
|
+
</task>
|
|
705
|
+
<task id="LOCAL-00121" summary="feat:增加停止绘画事件">
|
|
706
|
+
<created>1678929016258</created>
|
|
707
|
+
<option name="number" value="00121" />
|
|
708
|
+
<option name="presentableId" value="LOCAL-00121" />
|
|
709
|
+
<option name="project" value="LOCAL" />
|
|
710
|
+
<updated>1678929016258</updated>
|
|
711
|
+
</task>
|
|
712
|
+
<task id="LOCAL-00122" summary="feat:截图生成的图片保留标注信息">
|
|
713
|
+
<created>1678929084617</created>
|
|
714
|
+
<option name="number" value="00122" />
|
|
715
|
+
<option name="presentableId" value="LOCAL-00122" />
|
|
716
|
+
<option name="project" value="LOCAL" />
|
|
717
|
+
<updated>1678929084617</updated>
|
|
718
|
+
</task>
|
|
719
|
+
<task id="LOCAL-00123" summary="build:3.0.1">
|
|
720
|
+
<created>1678929156803</created>
|
|
721
|
+
<option name="number" value="00123" />
|
|
722
|
+
<option name="presentableId" value="LOCAL-00123" />
|
|
723
|
+
<option name="project" value="LOCAL" />
|
|
724
|
+
<updated>1678929156803</updated>
|
|
725
|
+
</task>
|
|
726
|
+
<task id="LOCAL-00124" summary="build:3.0.2 截图图片格式自定义">
|
|
727
|
+
<created>1680269167145</created>
|
|
728
|
+
<option name="number" value="00124" />
|
|
729
|
+
<option name="presentableId" value="LOCAL-00124" />
|
|
730
|
+
<option name="project" value="LOCAL" />
|
|
731
|
+
<updated>1680269167145</updated>
|
|
732
|
+
</task>
|
|
733
|
+
<task id="LOCAL-00125" summary="build:3.0.3 截图支持设置分辨率,质量,格式">
|
|
734
|
+
<created>1680440104839</created>
|
|
735
|
+
<option name="number" value="00125" />
|
|
736
|
+
<option name="presentableId" value="LOCAL-00125" />
|
|
737
|
+
<option name="project" value="LOCAL" />
|
|
738
|
+
<updated>1680440104840</updated>
|
|
739
|
+
</task>
|
|
740
|
+
<task id="LOCAL-00126" summary="build:3.0.3导航图宽高限制">
|
|
741
|
+
<created>1680528157819</created>
|
|
742
|
+
<option name="number" value="00126" />
|
|
743
|
+
<option name="presentableId" value="LOCAL-00126" />
|
|
744
|
+
<option name="project" value="LOCAL" />
|
|
745
|
+
<updated>1680528157819</updated>
|
|
746
|
+
</task>
|
|
747
|
+
<task id="LOCAL-00127" summary="build:3.0.5 截图记录位置信息">
|
|
748
|
+
<created>1680847205108</created>
|
|
749
|
+
<option name="number" value="00127" />
|
|
750
|
+
<option name="presentableId" value="LOCAL-00127" />
|
|
751
|
+
<option name="project" value="LOCAL" />
|
|
752
|
+
<updated>1680847205108</updated>
|
|
753
|
+
</task>
|
|
754
|
+
<task id="LOCAL-00128" summary="build:3.0.6 修复填充图形绘制时显示异常">
|
|
755
|
+
<created>1680859251199</created>
|
|
756
|
+
<option name="number" value="00128" />
|
|
757
|
+
<option name="presentableId" value="LOCAL-00128" />
|
|
758
|
+
<option name="project" value="LOCAL" />
|
|
759
|
+
<updated>1680859251199</updated>
|
|
760
|
+
</task>
|
|
761
|
+
<task id="LOCAL-00129" summary="build:3.0.6 填充图形绘制时,内容偏移">
|
|
762
|
+
<created>1680859385125</created>
|
|
763
|
+
<option name="number" value="00129" />
|
|
764
|
+
<option name="presentableId" value="LOCAL-00129" />
|
|
765
|
+
<option name="project" value="LOCAL" />
|
|
766
|
+
<updated>1680859385125</updated>
|
|
767
|
+
</task>
|
|
768
|
+
<option name="localTasksCounter" value="130" />
|
|
738
769
|
<servers />
|
|
739
770
|
</component>
|
|
740
771
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -747,6 +778,7 @@
|
|
|
747
778
|
<option value="Default.Author" />
|
|
748
779
|
<option value="Default.Date" />
|
|
749
780
|
<option value="Default.Subject" />
|
|
781
|
+
<option value="Space.CommitStatus" />
|
|
750
782
|
</list>
|
|
751
783
|
</option>
|
|
752
784
|
</component>
|
|
@@ -761,7 +793,7 @@
|
|
|
761
793
|
<entry key="branch">
|
|
762
794
|
<value>
|
|
763
795
|
<list>
|
|
764
|
-
<option value="master" />
|
|
796
|
+
<option value="origin/master" />
|
|
765
797
|
</list>
|
|
766
798
|
</value>
|
|
767
799
|
</entry>
|
|
@@ -776,17 +808,6 @@
|
|
|
776
808
|
<component name="VcsManagerConfiguration">
|
|
777
809
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
778
810
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
779
|
-
<MESSAGE value="2.2.5" />
|
|
780
|
-
<MESSAGE value="2.2.8" />
|
|
781
|
-
<MESSAGE value="优化标注信息显示" />
|
|
782
|
-
<MESSAGE value="标注事件回调" />
|
|
783
|
-
<MESSAGE value="defaultShow" />
|
|
784
|
-
<MESSAGE value="2.2.9" />
|
|
785
|
-
<MESSAGE value="矩形框的选中点变成线" />
|
|
786
|
-
<MESSAGE value="2.3.0" />
|
|
787
|
-
<MESSAGE value="矩形移动点默认隐藏,悬浮显示" />
|
|
788
|
-
<MESSAGE value="label.model.js" />
|
|
789
|
-
<MESSAGE value="解决反向绘制时,标注信息显示错误" />
|
|
790
811
|
<MESSAGE value="2.3.1" />
|
|
791
812
|
<MESSAGE value="优化渲染速度" />
|
|
792
813
|
<MESSAGE value="2.3.2" />
|
|
@@ -801,7 +822,18 @@
|
|
|
801
822
|
<MESSAGE value="2.4.0,绘制标注优化,一次只绘制2000个,分批绘制" />
|
|
802
823
|
<MESSAGE value="截图区域范围数值保留2位小数" />
|
|
803
824
|
<MESSAGE value="标注位置跳转增加参数,是否显示跳转动画" />
|
|
804
|
-
<
|
|
825
|
+
<MESSAGE value="2.4.1" />
|
|
826
|
+
<MESSAGE value="升级openseadragon插件" />
|
|
827
|
+
<MESSAGE value="feat:增加停止绘画事件" />
|
|
828
|
+
<MESSAGE value="feat:截图生成的图片保留标注信息" />
|
|
829
|
+
<MESSAGE value="build:3.0.1" />
|
|
830
|
+
<MESSAGE value="build:3.0.2 截图图片格式自定义" />
|
|
831
|
+
<MESSAGE value="build:3.0.3 截图支持设置分辨率,质量,格式" />
|
|
832
|
+
<MESSAGE value="build:3.0.3导航图宽高限制" />
|
|
833
|
+
<MESSAGE value="build:3.0.5 截图记录位置信息" />
|
|
834
|
+
<MESSAGE value="build:3.0.6 修复填充图形绘制时显示异常" />
|
|
835
|
+
<MESSAGE value="build:3.0.6 填充图形绘制时,内容偏移" />
|
|
836
|
+
<option name="LAST_COMMIT_MESSAGE" value="build:3.0.6 填充图形绘制时,内容偏移" />
|
|
805
837
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
806
838
|
</component>
|
|
807
839
|
<component name="XSLT-Support.FileAssociations.UIState">
|
|
@@ -66,8 +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
|
-
|
|
70
|
-
target: 'https://vai.hzztai.com',
|
|
69
|
+
target: 'http://192.168.1.16',
|
|
71
70
|
// target: 'https://tct.hzztai.com',
|
|
72
71
|
// target: 'https://pis-ningbo.hzztai.com',
|
|
73
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 = 'uploads/TCT/已入库/
|
|
28
|
+
const fileName = '/uploads/TCT/已入库/ningbo_pathology_center/neg/labeling/WS/T2018-46374_ThinPrep_2018-08-31_WS.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.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE2L2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjY2OTI2ODk1LCJleHAiOjE2NjY5NjUyOTUsIm5iZiI6MTY2NjkyNjg5NSwianRpIjoieU5mT3NXMmVraWs0RTUxayIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.2T7Xkx-5BhtR1HOc5FLbJIzDmgaq2bbCuXJoowUX0IE'},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
let cacheImage = {};
|
|
@@ -76,7 +76,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
76
76
|
},
|
|
77
77
|
pxConversion: {
|
|
78
78
|
unit: 'um',
|
|
79
|
-
imageCapRes: data.imageCapRes
|
|
79
|
+
imageCapRes: data.imageCapRes,
|
|
80
80
|
},
|
|
81
81
|
grid: {
|
|
82
82
|
show: false,
|
|
@@ -273,7 +273,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
273
273
|
kv.viewer.addHandler('zoom', (res) => {
|
|
274
274
|
const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
|
|
275
275
|
kv.$options.scale;
|
|
276
|
-
|
|
276
|
+
console.log(zoom.toFixed(2) / 1);
|
|
277
277
|
});
|
|
278
278
|
console.log(kv);
|
|
279
279
|
let list = [];
|
|
@@ -304,6 +304,7 @@ 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,
|
|
307
308
|
measure: true,
|
|
308
309
|
});
|
|
309
310
|
};
|
|
@@ -372,9 +373,9 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
372
373
|
console.log(e);
|
|
373
374
|
});*/
|
|
374
375
|
kv.$on(KfbView.events.EVENT_END_PAINTING, (e) => {
|
|
375
|
-
console.
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
console.log(e.detail);
|
|
377
|
+
list.push(e.detail);
|
|
378
|
+
kv.initLabelList(list);
|
|
378
379
|
// kv.board.endDraw();
|
|
379
380
|
});
|
|
380
381
|
kv.$on(KfbView.events.EVENT_DELETE_LABEL, (e) => {
|
|
@@ -412,111 +413,67 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
412
413
|
}, 6000);
|
|
413
414
|
}, 6000);
|
|
414
415
|
|
|
415
|
-
initLabels();
|
|
416
|
+
// initLabels();
|
|
416
417
|
|
|
417
418
|
function initLabels() {
|
|
418
419
|
const labels = [];
|
|
419
|
-
const colors = ['#027AFF', '#f56c6c'
|
|
420
|
-
for (let i = 0; i <
|
|
420
|
+
const colors = ['#027AFF', '#f56c6c'];
|
|
421
|
+
for (let i = 0; i < 50000; i++) {
|
|
421
422
|
const point = {
|
|
422
423
|
x: Math.random() * data.width,
|
|
423
424
|
y: Math.random() * data.height,
|
|
424
425
|
};
|
|
425
|
-
const point1 = {
|
|
426
|
-
x: point.x + Math.random() * 1000,
|
|
427
|
-
y: point.y + Math.random() * 1000,
|
|
428
|
-
};
|
|
429
426
|
const label = {
|
|
430
427
|
// fillStyle: 'rgba(2, 122, 255, 1)',
|
|
431
|
-
lineWidth:
|
|
432
|
-
points: [point,
|
|
428
|
+
lineWidth: 6,
|
|
429
|
+
points: [point, point],
|
|
433
430
|
scale: 0.1,
|
|
434
|
-
strokeStyle:
|
|
435
|
-
tool: '
|
|
436
|
-
move:
|
|
437
|
-
resize: true,
|
|
431
|
+
strokeStyle: Math.random() > .5 ? colors[0] : colors[1],
|
|
432
|
+
tool: 'Dot',
|
|
433
|
+
move: false,
|
|
438
434
|
};
|
|
439
435
|
labels.push(label);
|
|
440
436
|
}
|
|
441
437
|
kv.initLabelList(labels);
|
|
442
438
|
}
|
|
443
439
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
(
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
...r,
|
|
475
|
-
});
|
|
440
|
+
instance.get(
|
|
441
|
+
`/image_annotation?file=${fileName}&slide_label_id=48010&user_id=1`).
|
|
442
|
+
then(({data}) => {
|
|
443
|
+
data = data.data;
|
|
444
|
+
const labelRegionList = [];
|
|
445
|
+
(data || []).filter(item => item.id && item.region.width > 0).
|
|
446
|
+
forEach(item => {
|
|
447
|
+
const subClass = item.sub_class || item.subClass;
|
|
448
|
+
const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
|
|
449
|
+
const r = {
|
|
450
|
+
...item,
|
|
451
|
+
tool: (item.type || item.tool) === 'Spline' ?
|
|
452
|
+
'Polygon' :
|
|
453
|
+
(item.type || item.tool),
|
|
454
|
+
strokeStyle: `#${item.color.toString(16).
|
|
455
|
+
slice(2)}${item.color.toString(16).slice(0, 2)}`,
|
|
456
|
+
measure: true,
|
|
457
|
+
sub_class: subClass,
|
|
458
|
+
isROI: subClass === 'ROI',
|
|
459
|
+
isClose: item.isClose || item.is_close,
|
|
460
|
+
lineWidth: item.lineWidth || item.width,
|
|
461
|
+
text: item.text || item.description,
|
|
462
|
+
is_ai,
|
|
463
|
+
ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
|
|
464
|
+
ai_points: is_ai ? (item.ai_points ?? item.points) : '',
|
|
465
|
+
ai_region: is_ai ? (item.ai_region ?? item.region) : '',
|
|
466
|
+
};
|
|
467
|
+
r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1, -1);
|
|
468
|
+
labelRegionList.push({
|
|
469
|
+
...r,
|
|
476
470
|
});
|
|
477
|
-
console.time('initLabelList');
|
|
478
|
-
kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
|
|
479
|
-
console.timeEnd('initLabelList');
|
|
480
|
-
});
|
|
481
|
-
document.querySelector('#reDraw').addEventListener('click', () => {
|
|
482
|
-
instance.get(
|
|
483
|
-
`/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
|
|
484
|
-
then(({data}) => {
|
|
485
|
-
data = data.data;
|
|
486
|
-
const labelRegionList = [];
|
|
487
|
-
(data || []).filter(item => item.id && item.region.width > 0).
|
|
488
|
-
forEach(item => {
|
|
489
|
-
const subClass = item.sub_class || item.subClass;
|
|
490
|
-
const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
|
|
491
|
-
const r = {
|
|
492
|
-
...item,
|
|
493
|
-
tool: (item.type || item.tool) === 'Spline' ?
|
|
494
|
-
'Polygon' :
|
|
495
|
-
(item.type || item.tool),
|
|
496
|
-
strokeStyle: item.strokeStyle || `#${item.color.toString(16).
|
|
497
|
-
slice(2)}${item.color.toString(16).slice(0, 2)}`,
|
|
498
|
-
measure: true,
|
|
499
|
-
sub_class: subClass,
|
|
500
|
-
isROI: subClass === 'ROI',
|
|
501
|
-
isClose: item.isClose || item.is_close,
|
|
502
|
-
lineWidth: item.lineWidth || item.width,
|
|
503
|
-
text: item.text || item.description,
|
|
504
|
-
is_ai,
|
|
505
|
-
ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
|
|
506
|
-
ai_points: is_ai ? (item.ai_points ?? item.points) : '',
|
|
507
|
-
ai_region: is_ai ? (item.ai_region ?? item.region) : '',
|
|
508
|
-
};
|
|
509
|
-
r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1,
|
|
510
|
-
-1);
|
|
511
|
-
labelRegionList.push({
|
|
512
|
-
...r,
|
|
513
|
-
});
|
|
514
|
-
});
|
|
515
|
-
console.time('initLabelList');
|
|
516
|
-
kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
|
|
517
|
-
console.timeEnd('initLabelList');
|
|
518
471
|
});
|
|
519
|
-
|
|
472
|
+
kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
|
|
473
|
+
});
|
|
474
|
+
document.querySelector('#reDraw').addEventListener('click', () => {
|
|
475
|
+
initLabels();
|
|
476
|
+
});
|
|
520
477
|
});
|
|
521
478
|
|
|
522
479
|
/**
|
package/package.json
CHANGED
|
@@ -168,10 +168,10 @@ export class Shape extends ViewerCommon {
|
|
|
168
168
|
regionLabelList.forEach((item) => {
|
|
169
169
|
this.combination.setContent(this.canvas, item);
|
|
170
170
|
this.combination.draw({
|
|
171
|
-
points: item.
|
|
171
|
+
points: this.imageToViewerElementPoints(item.points),
|
|
172
172
|
tool: item.tool,
|
|
173
|
-
}, item.child.map(({
|
|
174
|
-
points:
|
|
173
|
+
}, item.child.map(({points, tool}) => ({
|
|
174
|
+
points: this.imageToViewerElementPoints(points),
|
|
175
175
|
tool,
|
|
176
176
|
})), this.viewport.getRotation());
|
|
177
177
|
});
|