kfb-view 2.3.3 → 2.3.4

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.
@@ -37,17 +37,8 @@
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$/src/components/area/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/area/index.js" afterDir="false" />
50
- <change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
51
42
  </list>
52
43
  <option name="SHOW_DIALOG" value="false" />
53
44
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -83,22 +74,22 @@
83
74
  <option name="hideEmptyMiddlePackages" value="true" />
84
75
  <option name="showLibraryContents" value="true" />
85
76
  </component>
86
- <component name="PropertiesComponent"><![CDATA[{
87
- "keyToString": {
88
- "DefaultHtmlFileTemplate": "HTML File",
89
- "Project.color": "4c401d",
90
- "WebServerToolWindowFactoryState": "false",
91
- "dart.analysis.tool.window.visible": "false",
92
- "last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view/example",
93
- "node.js.detected.package.eslint": "true",
94
- "node.js.selected.package.eslint": "(autodetect)",
95
- "nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
96
- "nodejs_package_manager_path": "npm",
97
- "settings.editor.selected.configurable": "settings.nodejs",
98
- "ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
99
- "vue.rearranger.settings.migration": "true"
77
+ <component name="PropertiesComponent">{
78
+ &quot;keyToString&quot;: {
79
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
80
+ &quot;Project.color&quot;: &quot;4c401d&quot;,
81
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
82
+ &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
83
+ &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
84
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
85
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
86
+ &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
87
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
88
+ &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
89
+ &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external&quot;,
90
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
100
91
  }
101
- }]]></component>
92
+ }</component>
102
93
  <component name="RecentsManager">
103
94
  <key name="CopyFile.RECENT_KEYS">
104
95
  <recent name="$PROJECT_DIR$/example" />
@@ -115,7 +106,7 @@
115
106
  <recent name="$PROJECT_DIR$/src/tool" />
116
107
  </key>
117
108
  </component>
118
- <component name="RunManager" selected="npm.build:lib">
109
+ <component name="RunManager" selected="npm.server:hot">
119
110
  <configuration name="build:lib" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
120
111
  <package-json value="$PROJECT_DIR$/package.json" />
121
112
  <command value="run" />
@@ -178,8 +169,8 @@
178
169
  </list>
179
170
  <recent_temporary>
180
171
  <list>
181
- <item itemvalue="npm.build:lib" />
182
172
  <item itemvalue="npm.server:hot" />
173
+ <item itemvalue="npm.build:lib" />
183
174
  <item itemvalue="npm.server" />
184
175
  <item itemvalue="npm.clean:lib" />
185
176
  <item itemvalue="npm.build:prod" />
@@ -365,35 +356,21 @@
365
356
  <workItem from="1664237971278" duration="500000" />
366
357
  <workItem from="1664521013893" duration="3516000" />
367
358
  <workItem from="1664527271315" duration="101000" />
368
- <workItem from="1666923133420" duration="7283000" />
369
- </task>
370
- <task id="LOCAL-00059" summary="2.1.15">
371
- <created>1650965886754</created>
372
- <option name="number" value="00059" />
373
- <option name="presentableId" value="LOCAL-00059" />
374
- <option name="project" value="LOCAL" />
375
- <updated>1650965886754</updated>
376
- </task>
377
- <task id="LOCAL-00060" summary="闭合曲线">
378
- <created>1650966647247</created>
379
- <option name="number" value="00060" />
380
- <option name="presentableId" value="LOCAL-00060" />
381
- <option name="project" value="LOCAL" />
382
- <updated>1650966647247</updated>
383
- </task>
384
- <task id="LOCAL-00061" summary="2.1.16">
385
- <created>1650967323558</created>
386
- <option name="number" value="00061" />
387
- <option name="presentableId" value="LOCAL-00061" />
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>
359
+ <workItem from="1666923133420" duration="7628000" />
360
+ <workItem from="1666938040394" duration="124000" />
361
+ <workItem from="1666938888266" duration="914000" />
362
+ <workItem from="1666940059058" duration="598000" />
363
+ <workItem from="1667175003009" duration="594000" />
364
+ <workItem from="1667184664626" duration="1313000" />
365
+ <workItem from="1667201967516" duration="2489000" />
366
+ <workItem from="1667268688798" duration="1219000" />
367
+ <workItem from="1667284578069" duration="184000" />
368
+ <workItem from="1667375142206" duration="2786000" />
369
+ <workItem from="1667378801635" duration="594000" />
370
+ <workItem from="1667393411315" duration="590000" />
371
+ <workItem from="1667434716150" duration="280000" />
372
+ <workItem from="1667617108891" duration="2574000" />
373
+ <workItem from="1667627800845" duration="112000" />
397
374
  </task>
398
375
  <task id="LOCAL-00063" summary="2.1.17">
399
376
  <created>1651037523261</created>
@@ -710,7 +687,35 @@
710
687
  <option name="project" value="LOCAL" />
711
688
  <updated>1666926343036</updated>
712
689
  </task>
713
- <option name="localTasksCounter" value="108" />
690
+ <task id="LOCAL-00108" summary="优化速度">
691
+ <created>1666937547422</created>
692
+ <option name="number" value="00108" />
693
+ <option name="presentableId" value="LOCAL-00108" />
694
+ <option name="project" value="LOCAL" />
695
+ <updated>1666937547423</updated>
696
+ </task>
697
+ <task id="LOCAL-00109" summary="2.3.3">
698
+ <created>1666937564499</created>
699
+ <option name="number" value="00109" />
700
+ <option name="presentableId" value="LOCAL-00109" />
701
+ <option name="project" value="LOCAL" />
702
+ <updated>1666937564500</updated>
703
+ </task>
704
+ <task id="LOCAL-00110" summary="解决标注时鼠标右键和左键同时点击时,移动异常">
705
+ <created>1667617934430</created>
706
+ <option name="number" value="00110" />
707
+ <option name="presentableId" value="LOCAL-00110" />
708
+ <option name="project" value="LOCAL" />
709
+ <updated>1667617934430</updated>
710
+ </task>
711
+ <task id="LOCAL-00111" summary="2.3.4">
712
+ <created>1667618110588</created>
713
+ <option name="number" value="00111" />
714
+ <option name="presentableId" value="LOCAL-00111" />
715
+ <option name="project" value="LOCAL" />
716
+ <updated>1667618110588</updated>
717
+ </task>
718
+ <option name="localTasksCounter" value="112" />
714
719
  <servers />
715
720
  </component>
716
721
  <component name="TypeScriptGeneratedFilesManager">
@@ -752,10 +757,6 @@
752
757
  <component name="VcsManagerConfiguration">
753
758
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
754
759
  <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
760
  <MESSAGE value="2.2.2" />
760
761
  <MESSAGE value="增加网格线和标尺" />
761
762
  <MESSAGE value="标注信息优化显示" />
@@ -777,7 +778,11 @@
777
778
  <MESSAGE value="2.3.1" />
778
779
  <MESSAGE value="优化渲染速度" />
779
780
  <MESSAGE value="2.3.2" />
780
- <option name="LAST_COMMIT_MESSAGE" value="2.3.2" />
781
+ <MESSAGE value="优化速度" />
782
+ <MESSAGE value="2.3.3" />
783
+ <MESSAGE value="解决标注时鼠标右键和左键同时点击时,移动异常" />
784
+ <MESSAGE value="2.3.4" />
785
+ <option name="LAST_COMMIT_MESSAGE" value="2.3.4" />
781
786
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
782
787
  </component>
783
788
  <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.16',
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 = '/uploads/TCT/已入库/ningbo_pathology_center/neg/labeling/WS/T2018-46374_ThinPrep_2018-08-31_WS.kfb';
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.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE2L2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjY2OTI2ODk1LCJleHAiOjE2NjY5NjUyOTUsIm5iZiI6MTY2NjkyNjg5NSwianRpIjoieU5mT3NXMmVraWs0RTUxayIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.2T7Xkx-5BhtR1HOc5FLbJIzDmgaq2bbCuXJoowUX0IE'},
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.log(e.detail);
377
- list.push(e.detail);
378
- kv.initLabelList(list);
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=48010&user_id=1`).
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
- initLabels();
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