Есть такой вызов функции:
cornerstone.loadAndCacheImage(file).then(function(image) {
console.log(image);
});
Не выводится ничего, хотя если взять саму функцию:
function loadAndCacheImage(imageId) {
if(imageId === undefined) {
throw "loadAndCacheImage: parameter imageId must not be undefined";
}
var imagePromise = cornerstone.imageCache.getImagePromise(imageId);
if(imagePromise !== undefined) {
return imagePromise;
}
imagePromise = loadImageFromImageLoader(imageId);
if(imagePromise === undefined) {
throw "loadAndCacheImage: no image loader for imageId";
}
cornerstone.imageCache.putImagePromise(imageId, imagePromise);
return imagePromise;
}
Даже если перед return написать:
console.log(imagePromise);
То выведется информация, но возвращаться ничего не хочет.
Продвижение своими сайтами как стратегия роста и независимости