cornerstone icon indicating copy to clipboard operation
cornerstone copied to clipboard

Rescaling Image on 2 layers

Open CredoSpero opened this issue 2 years ago • 0 comments

Hi! I am currently trying to display 2 images in layers onto an element. One is loaded through WADO Loader and the other is loaded through Web Image Loader. However, the images are of different sizes as such I am trying to use the use the cornerstone.rescaleImage(layer1, layer2) function to scale the two images to the same size. However, I am unable to run the function whenever I run the code, it returns cornerstone.rescaleImage is not a function.

I referred to a previous issue https://github.com/cornerstonejs/cornerstone/issues/440, where a user also had faced the same issue. Initially, I thought it could be because the images loaded from WebImageLoader have a spacing of undefined for its columnPixelSpacing and rowPixelSpacing as such, I have tried to add columnPixelSpacing and rowPixelSpacing properties to the image loaded from cornerstoneWebImageLoader in hopes to solve the issue but still, the error still returns that rescaleImage is not a function

Hope you could assist me with this issue as soon as possible as I am currently working on a project. Thank you!

CredoSpero avatar Jun 24 '22 10:06 CredoSpero