View in #cornerstone3d on Slack
@James_Manners: Is it possible to apply a different scale along x/y axis? For instance is it possible to set scale an image x axis = 1 but the y axis scale = 0.5?
@Peter_Newhook: For calibration? calibrateImageSpacing()
accepts either a number
(for scaling x and y consistently) or IImageCalibration
which allows you to set row and column pixel spacing independently.
https://www.cornerstonejs.org/docs/api/tools/namespaces/utilities/functions/calibrateimagespacing/
Function: calibrateImageSpacing() | Cornerstone.js
@James_Manners: Actually for display. I have images that have different pixel spacing for rows/cols. I would like to display the image with an effective 2:1 display scale to effectively stretch the y axis to make it easier to view details
@Peter_Newhook: Is this a DICOM file that has pixelSpacing
set internally?
@James_Manners: Yes. Our dicom files have PixelSpacing
specified.
@Bill_Wallace: It would be nice to allow ignoring the pixel spacing when calculating the aspect ratio, however, I don’t immediately see a way to do that.
@James_Manners: I had a quick look at the stackviewport. In an ideal world it would be great to pass scale as a [xScale, yScale]
tuple or a single value. When a tuple is passed, it could then be used to change the scale accordingly. I’ll add it to our backlog to investigate
@Bill_Wallace: I think passing in the aspect ratio specifically rather than trying to include it in the scale parameter would be easier. Part fo the issue is that one doesn’t always know the scale, or want to specify size by scale, but rather specify it via some other attribute, and passing in the aspect ratio specifically allows that.
@James_Manners: I appreciate your thoughts. From our use case, the images have row/col pixel spacing in the metadata allowing physical units without calibration. The ophthalmic oct images we are working with are generally captured with 2x-3x the rows resolution compared to column resolution. Our use case is I would like to “scale” the displayed image, so the vertical resolution is stretched compared to 1:1. This would allow the user to view the increased resolution but still allow measurements in physical units. Hence why in my head I saw it as a zoom/scale rather than an aspect ratio. I would appreciate your thought on how this compares to other use cases and the best balance for the project. And suggestions on ways we could work on a PR