kfb-view 2.2.2 → 2.2.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.
@@ -46,8 +46,8 @@
46
46
  <option name="RECENT_TEMPLATES">
47
47
  <list>
48
48
  <option value="CSS File" />
49
- <option value="JavaScript File" />
50
49
  <option value="HTML File" />
50
+ <option value="JavaScript File" />
51
51
  </list>
52
52
  </option>
53
53
  </component>
@@ -71,35 +71,35 @@
71
71
  <option name="hideEmptyMiddlePackages" value="true" />
72
72
  <option name="showLibraryContents" value="true" />
73
73
  </component>
74
- <component name="PropertiesComponent">{
75
- &quot;keyToString&quot;: {
76
- &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
77
- &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
78
- &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
79
- &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
80
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
81
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
82
- &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
83
- &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
84
- &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
85
- &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external&quot;,
86
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
74
+ <component name="PropertiesComponent"><![CDATA[{
75
+ "keyToString": {
76
+ "DefaultHtmlFileTemplate": "HTML File",
77
+ "WebServerToolWindowFactoryState": "false",
78
+ "dart.analysis.tool.window.visible": "false",
79
+ "last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view/example",
80
+ "node.js.detected.package.eslint": "true",
81
+ "node.js.selected.package.eslint": "(autodetect)",
82
+ "nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
83
+ "nodejs_package_manager_path": "npm",
84
+ "settings.editor.selected.configurable": "settings.nodejs",
85
+ "ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
86
+ "vue.rearranger.settings.migration": "true"
87
87
  }
88
- }</component>
88
+ }]]></component>
89
89
  <component name="RecentsManager">
90
90
  <key name="CopyFile.RECENT_KEYS">
91
+ <recent name="$PROJECT_DIR$/example" />
91
92
  <recent name="$PROJECT_DIR$/src/image" />
92
93
  <recent name="$PROJECT_DIR$/src/plugin" />
93
- <recent name="$PROJECT_DIR$/example" />
94
94
  <recent name="$PROJECT_DIR$/src/components/cache" />
95
95
  <recent name="$PROJECT_DIR$/src/components/rotation" />
96
96
  </key>
97
97
  <key name="MoveFile.RECENT_KEYS">
98
+ <recent name="$PROJECT_DIR$/src/components/grid" />
98
99
  <recent name="$PROJECT_DIR$" />
99
100
  <recent name="$PROJECT_DIR$/src" />
100
101
  <recent name="$PROJECT_DIR$/example" />
101
102
  <recent name="$PROJECT_DIR$/src/tool" />
102
- <recent name="$PROJECT_DIR$/src/components" />
103
103
  </key>
104
104
  </component>
105
105
  <component name="RunManager" selected="npm.build:lib">
@@ -297,63 +297,21 @@
297
297
  <workItem from="1658365477621" duration="2695000" />
298
298
  <workItem from="1658371298489" duration="3932000" />
299
299
  <workItem from="1658393509298" duration="2844000" />
300
- <workItem from="1658398367362" duration="819000" />
301
- </task>
302
- <task id="LOCAL-00037" summary="Curve is obsolete. Please use polygon instead">
303
- <created>1631760521355</created>
304
- <option name="number" value="00037" />
305
- <option name="presentableId" value="LOCAL-00037" />
306
- <option name="project" value="LOCAL" />
307
- <updated>1631760521355</updated>
308
- </task>
309
- <task id="LOCAL-00038" summary="优化调整">
310
- <created>1632362091089</created>
311
- <option name="number" value="00038" />
312
- <option name="presentableId" value="LOCAL-00038" />
313
- <option name="project" value="LOCAL" />
314
- <updated>1632362091089</updated>
315
- </task>
316
- <task id="LOCAL-00039" summary="2.1.2">
317
- <created>1632362102053</created>
318
- <option name="number" value="00039" />
319
- <option name="presentableId" value="LOCAL-00039" />
320
- <option name="project" value="LOCAL" />
321
- <updated>1632362102053</updated>
322
- </task>
323
- <task id="LOCAL-00040" summary="修复navigator中图片宽高一致时不显示">
324
- <created>1632364163945</created>
325
- <option name="number" value="00040" />
326
- <option name="presentableId" value="LOCAL-00040" />
327
- <option name="project" value="LOCAL" />
328
- <updated>1632364163945</updated>
329
- </task>
330
- <task id="LOCAL-00041" summary="2.1.3">
331
- <created>1632364173513</created>
332
- <option name="number" value="00041" />
333
- <option name="presentableId" value="LOCAL-00041" />
334
- <option name="project" value="LOCAL" />
335
- <updated>1632364173513</updated>
336
- </task>
337
- <task id="LOCAL-00042" summary="2.1.4">
338
- <created>1632364377230</created>
339
- <option name="number" value="00042" />
340
- <option name="presentableId" value="LOCAL-00042" />
341
- <option name="project" value="LOCAL" />
342
- <updated>1632364377230</updated>
343
- </task>
344
- <task id="LOCAL-00043" summary="navigator 获取元素方式修改">
345
- <created>1632379605009</created>
346
- <option name="number" value="00043" />
347
- <option name="presentableId" value="LOCAL-00043" />
348
- <option name="project" value="LOCAL" />
349
- <updated>1632379605009</updated>
350
- </task>
351
- <task id="LOCAL-00044" summary="chrome 49版本兼容">
352
- <created>1634268789961</created>
353
- <option name="number" value="00044" />
354
- <option name="presentableId" value="LOCAL-00044" />
355
- <option name="project" value="LOCAL" />
356
- <updated>1634268789961</updated>
300
+ <workItem from="1658398367362" duration="1815000" />
301
+ <workItem from="1658401123366" duration="603000" />
302
+ <workItem from="1658513789094" duration="298000" />
303
+ <workItem from="1658666796644" duration="14873000" />
304
+ <workItem from="1658714844889" duration="5805000" />
305
+ <workItem from="1658796588637" duration="759000" />
306
+ <workItem from="1659404898003" duration="5697000" />
307
+ <workItem from="1659486429990" duration="597000" />
308
+ <workItem from="1659504598946" duration="598000" />
309
+ <workItem from="1659509611001" duration="599000" />
310
+ <workItem from="1659522580871" duration="599000" />
311
+ <workItem from="1659572503492" duration="1041000" />
312
+ <workItem from="1659582596490" duration="598000" />
313
+ <workItem from="1659683032926" duration="599000" />
314
+ <workItem from="1659952433819" duration="4309000" />
357
315
  </task>
358
316
  <task id="LOCAL-00045" summary="刻度线显示异常">
359
317
  <created>1634437932304</created>
@@ -642,7 +600,63 @@
642
600
  <option name="project" value="LOCAL" />
643
601
  <updated>1658398987163</updated>
644
602
  </task>
645
- <option name="localTasksCounter" value="86" />
603
+ <task id="LOCAL-00086" summary="2.2.2">
604
+ <created>1658399404095</created>
605
+ <option name="number" value="00086" />
606
+ <option name="presentableId" value="LOCAL-00086" />
607
+ <option name="project" value="LOCAL" />
608
+ <updated>1658399404095</updated>
609
+ </task>
610
+ <task id="LOCAL-00087" summary="增加网格线和标尺">
611
+ <created>1658710072174</created>
612
+ <option name="number" value="00087" />
613
+ <option name="presentableId" value="LOCAL-00087" />
614
+ <option name="project" value="LOCAL" />
615
+ <updated>1658710072175</updated>
616
+ </task>
617
+ <task id="LOCAL-00088" summary="标注信息优化显示">
618
+ <created>1658713081785</created>
619
+ <option name="number" value="00088" />
620
+ <option name="presentableId" value="LOCAL-00088" />
621
+ <option name="project" value="LOCAL" />
622
+ <updated>1658713081785</updated>
623
+ </task>
624
+ <task id="LOCAL-00089" summary="2.2.3">
625
+ <created>1658713100852</created>
626
+ <option name="number" value="00089" />
627
+ <option name="presentableId" value="LOCAL-00089" />
628
+ <option name="project" value="LOCAL" />
629
+ <updated>1658713100852</updated>
630
+ </task>
631
+ <task id="LOCAL-00090" summary="grid优化">
632
+ <created>1658715904288</created>
633
+ <option name="number" value="00090" />
634
+ <option name="presentableId" value="LOCAL-00090" />
635
+ <option name="project" value="LOCAL" />
636
+ <updated>1658715904291</updated>
637
+ </task>
638
+ <task id="LOCAL-00091" summary="触发限制优化">
639
+ <created>1659410472728</created>
640
+ <option name="number" value="00091" />
641
+ <option name="presentableId" value="LOCAL-00091" />
642
+ <option name="project" value="LOCAL" />
643
+ <updated>1659410472729</updated>
644
+ </task>
645
+ <task id="LOCAL-00092" summary="增加图片绘制">
646
+ <created>1659956040931</created>
647
+ <option name="number" value="00092" />
648
+ <option name="presentableId" value="LOCAL-00092" />
649
+ <option name="project" value="LOCAL" />
650
+ <updated>1659956040931</updated>
651
+ </task>
652
+ <task id="LOCAL-00093" summary="2.2.5">
653
+ <created>1659956059809</created>
654
+ <option name="number" value="00093" />
655
+ <option name="presentableId" value="LOCAL-00093" />
656
+ <option name="project" value="LOCAL" />
657
+ <updated>1659956059809</updated>
658
+ </task>
659
+ <option name="localTasksCounter" value="94" />
646
660
  <servers />
647
661
  </component>
648
662
  <component name="TypeScriptGeneratedFilesManager">
@@ -684,14 +698,6 @@
684
698
  <component name="VcsManagerConfiguration">
685
699
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
686
700
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
687
- <MESSAGE value="闭合曲线" />
688
- <MESSAGE value="2.1.16" />
689
- <MESSAGE value="优化加载速度" />
690
- <MESSAGE value="2.1.17" />
691
- <MESSAGE value="2.1.18" />
692
- <MESSAGE value="增加曲线开始点显示" />
693
- <MESSAGE value="2.1.19" />
694
- <MESSAGE value="绘制起点提示" />
695
701
  <MESSAGE value="曲线双击结束绘制" />
696
702
  <MESSAGE value="标注时增加右键拖动视野" />
697
703
  <MESSAGE value="曲线绘制中,按删除键,删除上一个标注点" />
@@ -709,7 +715,15 @@
709
715
  <MESSAGE value="index.js" />
710
716
  <MESSAGE value="导航轨迹显示" />
711
717
  <MESSAGE value="刻度线显示" />
712
- <option name="LAST_COMMIT_MESSAGE" value="刻度线显示" />
718
+ <MESSAGE value="2.2.2" />
719
+ <MESSAGE value="增加网格线和标尺" />
720
+ <MESSAGE value="标注信息优化显示" />
721
+ <MESSAGE value="2.2.3" />
722
+ <MESSAGE value="grid优化" />
723
+ <MESSAGE value="触发限制优化" />
724
+ <MESSAGE value="增加图片绘制" />
725
+ <MESSAGE value="2.2.5" />
726
+ <option name="LAST_COMMIT_MESSAGE" value="2.2.5" />
713
727
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
714
728
  </component>
715
729
  <component name="XSLT-Support.FileAssociations.UIState">
@@ -65,9 +65,10 @@ module.exports = function() {
65
65
  context: ['/api', '/image.php', '/process.php'],
66
66
  // target: 'http://gastric.label.hzztai.com/',
67
67
  // target: 'http://192.168.1.91:7007',
68
- target: 'http://192.168.1.91',
68
+ // target: 'http://192.168.1.91',
69
69
  // target: 'https://tct.hzztai.com',
70
70
  // target: 'https://pis-ningbo.hzztai.com',
71
+ target: 'https://pis-test.hzztai.com',
71
72
  secure: false,
72
73
  changeOrigin: true,
73
74
  },
package/example/index.js CHANGED
@@ -2,7 +2,7 @@ import {KfbView, hslToRgb, rgbToHsl, cacheGammaTable} from '../src';
2
2
  import axios from 'axios';
3
3
  import {EVENT_DB_CLICK_LABEL} from '../src/const/event';
4
4
 
5
- const fileName = '/upload/large_file/last/2022/04/26/d31a31bf1ae5b73fca63f72e2affc879/胃镜1.kfb';
5
+ const fileName = '/upload/large_file/last/2022/06/22/3625ce6de8197c7315ce9e05b4ef233b/IHC.kfb';
6
6
 
7
7
  const instance = axios.create({
8
8
  baseURL: '/api',
@@ -40,6 +40,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
40
40
  ROI: false,
41
41
  },
42
42
  graduation: {
43
+ show: true,
43
44
  left: 30,
44
45
  bottom: 10,
45
46
  },
@@ -48,12 +49,15 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
48
49
  style: 'right: 0;top: 0',
49
50
  thumbnail: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
50
51
  scale: data.scanScale,
51
- vestigeZoom: .1,
52
52
  },
53
53
  pxConversion: {
54
54
  unit: 'um',
55
55
  imageCapRes: data.imageCapRes,
56
56
  },
57
+ grid: {
58
+ show: true,
59
+ ruler: true,
60
+ },
57
61
  openSeadragonOptions: {
58
62
  maxZoomLevel: data.scanScale * 10,
59
63
  // imageLoaderLimit: 1,
@@ -139,7 +143,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
139
143
  }
140
144
  if (rangeB !== 0) {
141
145
  b = b * (1 + rangeB);
142
- g = g > 255 ? 255 : g;
146
+ b = b > 255 ? 255 : b;
143
147
  }
144
148
  if (rangeS !== 0) {
145
149
  let {h, s, l} = rgbToHsl(r, g, b);
@@ -182,6 +186,17 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
182
186
  size.y,
183
187
  );
184
188
  },
189
+ measure: {
190
+ handler(content, label) {
191
+ return [...content];
192
+ },
193
+ },
194
+ labelList: [
195
+ {
196
+ tool: 'Image',
197
+ points: [{x: 10000, y: 3000}, {x: 11000, y: 4000}],
198
+ src: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
199
+ }],
185
200
  });
186
201
  /* kv.board.startDraw({
187
202
  tool: KfbView.marks.POLYGON,
@@ -189,7 +204,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
189
204
  kv.viewer.addHandler('zoom', (res) => {
190
205
  const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
191
206
  kv.$options.scale;
192
- // console.log(zoom.toFixed(2) / 1);
207
+ console.log(zoom.toFixed(2) / 1);
193
208
  });
194
209
  console.log(kv);
195
210
  let list = [];
@@ -222,7 +237,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
222
237
  lineWidth: 10,
223
238
  isROI: false,
224
239
  once: true,
225
- measure: false,
240
+ measure: true,
226
241
  resize: false,
227
242
  move: false,
228
243
  fillStyle: '#ff00ff8d',
@@ -328,6 +343,9 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
328
343
  });*/
329
344
  setTimeout(() => {
330
345
  // kv.destroy();
346
+ setTimeout(() => {
347
+ // kv.destroy();
348
+ }, 6000);
331
349
  }, 6000);
332
350
 
333
351
  // initLabels();