View in #cornerstone3d on Slack
@Kenny_Reyes: Does anyone know how to program a “real size image” in a Stack Viewport? In the examples we have how to do the ‘fit to window’ to adjust the image to the viewport element, but not the ‘real image size’ .
@Bill_Wallace: It is a bit of a pain and not well supported, but what you have to do is to add a hidden element which is a specific size in cm using the css cm sizing. Read the number of pixels for that element, and then use a pixel scale value that takes the image size for 1 pixel to translates that to the screen size for 1 pixel.
@Kenny_Reyes: OMG, I thought I could play something about CanvasToRealWorld methods, but now I see it is not so simple.
Thanks!
By the way, do you know how to convert the annotation tools from pixels to millimeters?
I have all in px
@Bill_Wallace: You need to have the images calibrated for the pixel spacing and associated sizing