kfb-view 2.3.9 → 2.4.1

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.
@@ -1,5 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
3
6
  <component name="BranchesTreeState">
4
7
  <expand>
5
8
  <path>
@@ -36,11 +39,10 @@
36
39
  </select>
37
40
  </component>
38
41
  <component name="ChangeListManager">
39
- <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="2.3.5,截图文字内容可自定义">
42
+ <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="截图区域范围数值保留2位小数">
40
43
  <change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
41
44
  <change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
42
45
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
43
- <change beforePath="$PROJECT_DIR$/src/components/shape/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/shape/index.js" afterDir="false" />
44
46
  </list>
45
47
  <option name="SHOW_DIALOG" value="false" />
46
48
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -76,22 +78,24 @@
76
78
  <option name="hideEmptyMiddlePackages" value="true" />
77
79
  <option name="showLibraryContents" value="true" />
78
80
  </component>
79
- <component name="PropertiesComponent">{
80
- &quot;keyToString&quot;: {
81
- &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
82
- &quot;Project.color&quot;: &quot;4c401d&quot;,
83
- &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
84
- &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
85
- &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
86
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
87
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
88
- &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
89
- &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
90
- &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
91
- &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external&quot;,
92
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
81
+ <component name="PropertiesComponent"><![CDATA[{
82
+ "keyToString": {
83
+ "DefaultHtmlFileTemplate": "HTML File",
84
+ "Project.color": "4c401d",
85
+ "WebServerToolWindowFactoryState": "false",
86
+ "dart.analysis.tool.window.visible": "false",
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/JavaScriptLanguage/jsLanguageServicesImpl/external",
96
+ "vue.rearranger.settings.migration": "true"
93
97
  }
94
- }</component>
98
+ }]]></component>
95
99
  <component name="RecentsManager">
96
100
  <key name="CopyFile.RECENT_KEYS">
97
101
  <recent name="$PROJECT_DIR$/example" />
@@ -380,28 +384,12 @@
380
384
  <workItem from="1669545429121" duration="449000" />
381
385
  <workItem from="1669940971680" duration="1305000" />
382
386
  <workItem from="1669965653573" duration="2149000" />
383
- <workItem from="1671419756098" duration="338000" />
384
- </task>
385
- <task id="LOCAL-00067" summary="2.1.19">
386
- <created>1657181784906</created>
387
- <option name="number" value="00067" />
388
- <option name="presentableId" value="LOCAL-00067" />
389
- <option name="project" value="LOCAL" />
390
- <updated>1657181784906</updated>
391
- </task>
392
- <task id="LOCAL-00068" summary="绘制起点提示">
393
- <created>1657182306689</created>
394
- <option name="number" value="00068" />
395
- <option name="presentableId" value="LOCAL-00068" />
396
- <option name="project" value="LOCAL" />
397
- <updated>1657182306689</updated>
398
- </task>
399
- <task id="LOCAL-00069" summary="曲线双击结束绘制">
400
- <created>1657532017463</created>
401
- <option name="number" value="00069" />
402
- <option name="presentableId" value="LOCAL-00069" />
403
- <option name="project" value="LOCAL" />
404
- <updated>1657532017464</updated>
387
+ <workItem from="1671419756098" duration="2398000" />
388
+ <workItem from="1671437015276" duration="591000" />
389
+ <workItem from="1671501857160" duration="90000" />
390
+ <workItem from="1671751607914" duration="9693000" />
391
+ <workItem from="1671762555964" duration="1197000" />
392
+ <workItem from="1675327241367" duration="367000" />
405
393
  </task>
406
394
  <task id="LOCAL-00070" summary="标注时增加右键拖动视野">
407
395
  <created>1657537220254</created>
@@ -725,7 +713,28 @@
725
713
  <option name="project" value="LOCAL" />
726
714
  <updated>1669966382574</updated>
727
715
  </task>
728
- <option name="localTasksCounter" value="116" />
716
+ <task id="LOCAL-00116" summary="2.4.0,绘制标注优化,一次只绘制2000个,分批绘制">
717
+ <created>1671761704584</created>
718
+ <option name="number" value="00116" />
719
+ <option name="presentableId" value="LOCAL-00116" />
720
+ <option name="project" value="LOCAL" />
721
+ <updated>1671761704585</updated>
722
+ </task>
723
+ <task id="LOCAL-00117" summary="截图区域范围数值保留2位小数">
724
+ <created>1675327515756</created>
725
+ <option name="number" value="00117" />
726
+ <option name="presentableId" value="LOCAL-00117" />
727
+ <option name="project" value="LOCAL" />
728
+ <updated>1675327515756</updated>
729
+ </task>
730
+ <task id="LOCAL-00118" summary="标注位置跳转增加参数,是否显示跳转动画">
731
+ <created>1675327595052</created>
732
+ <option name="number" value="00118" />
733
+ <option name="presentableId" value="LOCAL-00118" />
734
+ <option name="project" value="LOCAL" />
735
+ <updated>1675327595052</updated>
736
+ </task>
737
+ <option name="localTasksCounter" value="119" />
729
738
  <servers />
730
739
  </component>
731
740
  <component name="TypeScriptGeneratedFilesManager">
@@ -767,9 +776,6 @@
767
776
  <component name="VcsManagerConfiguration">
768
777
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
769
778
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
770
- <MESSAGE value="grid优化" />
771
- <MESSAGE value="触发限制优化" />
772
- <MESSAGE value="增加图片绘制" />
773
779
  <MESSAGE value="2.2.5" />
774
780
  <MESSAGE value="2.2.8" />
775
781
  <MESSAGE value="优化标注信息显示" />
@@ -792,7 +798,10 @@
792
798
  <MESSAGE value="2.3.6,优化移动标注时的判断操作" />
793
799
  <MESSAGE value="2.3.6,截图文字内容判断异常" />
794
800
  <MESSAGE value="2.3.8,截图文字内容增加函数" />
795
- <option name="LAST_COMMIT_MESSAGE" value="2.3.8,截图文字内容增加函数" />
801
+ <MESSAGE value="2.4.0,绘制标注优化,一次只绘制2000个,分批绘制" />
802
+ <MESSAGE value="截图区域范围数值保留2位小数" />
803
+ <MESSAGE value="标注位置跳转增加参数,是否显示跳转动画" />
804
+ <option name="LAST_COMMIT_MESSAGE" value="标注位置跳转增加参数,是否显示跳转动画" />
796
805
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
797
806
  </component>
798
807
  <component name="XSLT-Support.FileAssociations.UIState">
@@ -66,7 +66,8 @@ 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.22',
69
+ // target: 'http://192.168.1.22',
70
+ target: 'https://vai.hzztai.com',
70
71
  // target: 'https://tct.hzztai.com',
71
72
  // target: 'https://pis-ningbo.hzztai.com',
72
73
  // target: 'https://pis-test.hzztai.com',
package/example/index.js CHANGED
@@ -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 || 1,
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
- console.log(zoom.toFixed(2) / 1);
276
+ // console.log(zoom.toFixed(2) / 1);
277
277
  });
278
278
  console.log(kv);
279
279
  let list = [];
@@ -412,67 +412,36 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
412
412
  }, 6000);
413
413
  }, 6000);
414
414
 
415
- // initLabels();
415
+ initLabels();
416
416
 
417
417
  function initLabels() {
418
418
  const labels = [];
419
- const colors = ['#027AFF', '#f56c6c'];
420
- for (let i = 0; i < 50000; i++) {
419
+ const colors = ['#027AFF', '#f56c6c', '#11ff6c', '#f56cff', '#11ffff'];
420
+ for (let i = 0; i < 10000; i++) {
421
421
  const point = {
422
422
  x: Math.random() * data.width,
423
423
  y: Math.random() * data.height,
424
424
  };
425
+ const point1 = {
426
+ x: point.x + Math.random() * 1000,
427
+ y: point.y + Math.random() * 1000,
428
+ };
425
429
  const label = {
426
430
  // fillStyle: 'rgba(2, 122, 255, 1)',
427
- lineWidth: 6,
428
- points: [point, point],
431
+ lineWidth: 2,
432
+ points: [point, point1],
429
433
  scale: 0.1,
430
- strokeStyle: Math.random() > .5 ? colors[0] : colors[1],
431
- tool: 'Dot',
432
- move: false,
434
+ strokeStyle: colors[(Math.random() * colors.length) >> 0],
435
+ tool: 'Rectangle',
436
+ move: true,
437
+ resize: true,
433
438
  };
434
439
  labels.push(label);
435
440
  }
436
441
  kv.initLabelList(labels);
437
442
  }
438
443
 
439
- instance.get(
440
- `/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
441
- then(({data}) => {
442
- data = data.data;
443
- const labelRegionList = [];
444
- (data || []).filter(item => item.id && item.region.width > 0).
445
- forEach(item => {
446
- const subClass = item.sub_class || item.subClass;
447
- const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
448
- const r = {
449
- ...item,
450
- tool: (item.type || item.tool) === 'Spline' ?
451
- 'Polygon' :
452
- (item.type || item.tool),
453
- strokeStyle: item.strokeStyle || `#${item.color.toString(16).
454
- slice(2)}${item.color.toString(16).slice(0, 2)}`,
455
- measure: true,
456
- sub_class: subClass,
457
- isROI: subClass === 'ROI',
458
- isClose: item.isClose || item.is_close,
459
- lineWidth: item.lineWidth || item.width,
460
- text: item.text || item.description,
461
- is_ai,
462
- ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
463
- ai_points: is_ai ? (item.ai_points ?? item.points) : '',
464
- ai_region: is_ai ? (item.ai_region ?? item.region) : '',
465
- };
466
- r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1, -1);
467
- labelRegionList.push({
468
- ...r,
469
- });
470
- });
471
- console.time('initLabelList');
472
- kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
473
- console.timeEnd('initLabelList');
474
- });
475
- document.querySelector('#reDraw').addEventListener('click', () => {
444
+ /*
476
445
  instance.get(
477
446
  `/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
478
447
  then(({data}) => {
@@ -500,8 +469,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
500
469
  ai_points: is_ai ? (item.ai_points ?? item.points) : '',
501
470
  ai_region: is_ai ? (item.ai_region ?? item.region) : '',
502
471
  };
503
- r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1,
504
- -1);
472
+ r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1, -1);
505
473
  labelRegionList.push({
506
474
  ...r,
507
475
  });
@@ -510,7 +478,45 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
510
478
  kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
511
479
  console.timeEnd('initLabelList');
512
480
  });
513
- });
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
+ });
519
+ });*/
514
520
  });
515
521
 
516
522
  /**