hellfire 0.30.8 → 0.30.10
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/CHANGELOG.md +8 -0
- package/dist/index.js +97 -52
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.30.10](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.9...v0.30.10) (2025-08-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.30.9](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.8...v0.30.9) (2025-08-14)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [0.30.8](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.7...v0.30.8) (2025-08-09)
|
|
6
14
|
|
|
7
15
|
|
package/dist/index.js
CHANGED
|
@@ -10439,19 +10439,42 @@ function executeTask() {
|
|
|
10439
10439
|
|
|
10440
10440
|
numRequest++;
|
|
10441
10441
|
task.execute().then(function (res) {
|
|
10442
|
-
if (
|
|
10443
|
-
|
|
10444
|
-
|
|
10442
|
+
if (!res.sizeInBytes && task.extra.backupId) {
|
|
10443
|
+
// 解析图像数据出问题导致得到的图像是空的
|
|
10444
|
+
// 目前碰到的问题是DR图像压缩后一部分图像会出现解析失败问题,尝试获取原始图像来解决
|
|
10445
|
+
task.backupExecute().then(function (backupRes) {
|
|
10446
|
+
task.putCacheByBackup();
|
|
10447
|
+
|
|
10448
|
+
if (executeCallback) {
|
|
10449
|
+
executeCallback(task, taskPool.length);
|
|
10450
|
+
}
|
|
10445
10451
|
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10452
|
+
numRequest--;
|
|
10453
|
+
task.callbacks && task.callbacks.map(function (callback) {
|
|
10454
|
+
callback({
|
|
10455
|
+
success: true,
|
|
10456
|
+
res: backupRes
|
|
10457
|
+
});
|
|
10458
|
+
});
|
|
10459
|
+
delete cachedTask[task.key];
|
|
10460
|
+
executeTask();
|
|
10451
10461
|
});
|
|
10452
|
-
}
|
|
10453
|
-
|
|
10454
|
-
|
|
10462
|
+
} else {
|
|
10463
|
+
// 获得正常的图像数据
|
|
10464
|
+
if (executeCallback) {
|
|
10465
|
+
executeCallback(task, taskPool.length);
|
|
10466
|
+
}
|
|
10467
|
+
|
|
10468
|
+
numRequest--;
|
|
10469
|
+
task.callbacks && task.callbacks.map(function (callback) {
|
|
10470
|
+
callback({
|
|
10471
|
+
success: true,
|
|
10472
|
+
res: res
|
|
10473
|
+
});
|
|
10474
|
+
});
|
|
10475
|
+
delete cachedTask[task.key];
|
|
10476
|
+
executeTask();
|
|
10477
|
+
}
|
|
10455
10478
|
}, function (err) {
|
|
10456
10479
|
// 请求失败 重试机制
|
|
10457
10480
|
numRequest--;
|
|
@@ -10598,10 +10621,11 @@ function tryToClearPixelData(element, dataSet) {
|
|
|
10598
10621
|
function addTaskPool(series) {
|
|
10599
10622
|
lodash$1.forEach(series, function (item) {
|
|
10600
10623
|
if (item && item.imageIds) {
|
|
10601
|
-
lodash$1.forEach(item.imageIds, function (imageId) {
|
|
10624
|
+
lodash$1.forEach(item.imageIds, function (imageId, index) {
|
|
10602
10625
|
var imageTask = buildImageRequestTask(imageId, {
|
|
10603
10626
|
extra: {
|
|
10604
|
-
series: item.seriesInstanceUID
|
|
10627
|
+
series: item.seriesInstanceUID,
|
|
10628
|
+
backupId: item.imageIdsBackup && item.imageIdsBackup[index]
|
|
10605
10629
|
}
|
|
10606
10630
|
});
|
|
10607
10631
|
addLoadImageTask(imageTask);
|
|
@@ -10645,6 +10669,31 @@ function changePriorityBySeries(seriesInstanceUID, series) {
|
|
|
10645
10669
|
}
|
|
10646
10670
|
}
|
|
10647
10671
|
|
|
10672
|
+
function handleTopPriorityTask(imageId, priority, resolve, reject) {
|
|
10673
|
+
var _priority = highLevelPriority;
|
|
10674
|
+
|
|
10675
|
+
if (priority || priority === 0) {
|
|
10676
|
+
_priority = priority;
|
|
10677
|
+
} else {
|
|
10678
|
+
highLevelPriority++;
|
|
10679
|
+
} // imageId提取series uid
|
|
10680
|
+
|
|
10681
|
+
|
|
10682
|
+
var match = imageId.match(/series\/(.*?)\/instances/);
|
|
10683
|
+
var seriesUId = match ? match[1] : null;
|
|
10684
|
+
var imageTask = buildImageRequestTask(imageId, {
|
|
10685
|
+
priority: _priority,
|
|
10686
|
+
extra: {
|
|
10687
|
+
series: seriesUId
|
|
10688
|
+
}
|
|
10689
|
+
});
|
|
10690
|
+
addLoadImageTask(imageTask).then(function (res) {
|
|
10691
|
+
resolve(res);
|
|
10692
|
+
}).catch(function (e) {
|
|
10693
|
+
reject(e);
|
|
10694
|
+
});
|
|
10695
|
+
}
|
|
10696
|
+
|
|
10648
10697
|
function loadAndCacheImagePlus(imageId, priority, forceRefresh) {
|
|
10649
10698
|
return new Promise(function (resolve, reject) {
|
|
10650
10699
|
if (forceRefresh) {
|
|
@@ -10655,33 +10704,16 @@ function loadAndCacheImagePlus(imageId, priority, forceRefresh) {
|
|
|
10655
10704
|
|
|
10656
10705
|
if (imageLoadObject && !forceRefresh) {
|
|
10657
10706
|
imageLoadObject.promise.then(function (image) {
|
|
10658
|
-
|
|
10707
|
+
if (!image.sizeInBytes) {
|
|
10708
|
+
handleTopPriorityTask(imageId, priority, resolve, reject);
|
|
10709
|
+
} else {
|
|
10710
|
+
resolve(image);
|
|
10711
|
+
}
|
|
10659
10712
|
}, function (err) {
|
|
10660
10713
|
reject(err);
|
|
10661
10714
|
});
|
|
10662
10715
|
} else {
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
if (priority || priority === 0) {
|
|
10666
|
-
_priority = priority;
|
|
10667
|
-
} else {
|
|
10668
|
-
highLevelPriority++;
|
|
10669
|
-
} // imageId提取series uid
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
var match = imageId.match(/series\/(.*?)\/instances/);
|
|
10673
|
-
var seriesUId = match ? match[1] : null;
|
|
10674
|
-
var imageTask = buildImageRequestTask(imageId, {
|
|
10675
|
-
priority: _priority,
|
|
10676
|
-
extra: {
|
|
10677
|
-
series: seriesUId
|
|
10678
|
-
}
|
|
10679
|
-
});
|
|
10680
|
-
addLoadImageTask(imageTask).then(function (res) {
|
|
10681
|
-
resolve(res);
|
|
10682
|
-
}).catch(function (e) {
|
|
10683
|
-
reject(e);
|
|
10684
|
-
});
|
|
10716
|
+
handleTopPriorityTask(imageId, priority, resolve, reject);
|
|
10685
10717
|
}
|
|
10686
10718
|
});
|
|
10687
10719
|
}
|
|
@@ -10693,6 +10725,14 @@ function buildImageRequestTask(imageId) {
|
|
|
10693
10725
|
}, config), {}, {
|
|
10694
10726
|
execute: function execute() {
|
|
10695
10727
|
return cornerstone.loadAndCacheImage(imageId);
|
|
10728
|
+
},
|
|
10729
|
+
backupExecute: function backupExecute() {
|
|
10730
|
+
cornerstone.imageCache.removeImageLoadObject(imageId);
|
|
10731
|
+
return cornerstone.loadAndCacheImage(config.extra.backupId);
|
|
10732
|
+
},
|
|
10733
|
+
putCacheByBackup: function putCacheByBackup() {
|
|
10734
|
+
var data = cornerstone.imageCache.getImageLoadObject(config.extra.backupId);
|
|
10735
|
+
cornerstone.imageCache.putImageLoadObject(imageId, data);
|
|
10696
10736
|
}
|
|
10697
10737
|
});
|
|
10698
10738
|
}
|
|
@@ -75934,24 +75974,29 @@ var mergeProps$D = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
75934
75974
|
} // 清除dicom缓存
|
|
75935
75975
|
|
|
75936
75976
|
|
|
75937
|
-
purgeDicomCache(); //
|
|
75938
|
-
// 电脑端清除时做判断,超出60%的时候删除前30%
|
|
75977
|
+
purgeDicomCache(); // 清除所有imageCache
|
|
75939
75978
|
|
|
75940
|
-
var isMobile = ua.isDeviceTypeMobile();
|
|
75941
75979
|
var cacheInfo = cornerstone.imageCache.getCacheInfo();
|
|
75942
|
-
var maximumSizeInBytes = cacheInfo.maximumSizeInBytes
|
|
75943
|
-
|
|
75944
|
-
|
|
75945
|
-
|
|
75946
|
-
|
|
75947
|
-
|
|
75948
|
-
|
|
75949
|
-
|
|
75950
|
-
|
|
75951
|
-
|
|
75952
|
-
|
|
75953
|
-
|
|
75954
|
-
|
|
75980
|
+
var maximumSizeInBytes = cacheInfo.maximumSizeInBytes;
|
|
75981
|
+
cornerstone.imageCache.setMaximumSizeBytes(0);
|
|
75982
|
+
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes);
|
|
75983
|
+
/**
|
|
75984
|
+
* T13247 之前的方案,目前暂时修改为全部清除
|
|
75985
|
+
* 手机端清除所有imageCache,电脑端清除时做判断,超出60%的时候删除前30%
|
|
75986
|
+
* const isMobile = ua.isDeviceTypeMobile();
|
|
75987
|
+
* const cacheInfo = cornerstone.imageCache.getCacheInfo();
|
|
75988
|
+
* const {maximumSizeInBytes, cacheSizeInBytes} = cacheInfo;
|
|
75989
|
+
* if (isMobile) {
|
|
75990
|
+
* cornerstone.imageCache.setMaximumSizeBytes(0);
|
|
75991
|
+
* cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes);
|
|
75992
|
+
* } else {
|
|
75993
|
+
* if (cacheSizeInBytes > maximumSizeInBytes * 0.6) {
|
|
75994
|
+
* // 暂未找到更合适的接口,setMaximumSizeBytes时会触发purgeCacheIfNecessary,可以达到效果
|
|
75995
|
+
* cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes * 0.3);
|
|
75996
|
+
* cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes);
|
|
75997
|
+
* }
|
|
75998
|
+
* }
|
|
75999
|
+
*/
|
|
75955
76000
|
},
|
|
75956
76001
|
// 匹配序列 切换到指定图像位置
|
|
75957
76002
|
scrollSeriesImageToIndex: function scrollSeriesImageToIndex(seriesUID, SOPInstanceUID) {
|