Open adellalibera opened 6 years ago
Thanks for the report! I just checked and you're definitely right, it doesn't do anything on rotate...
@swederik, do you have an example image you can provide? Is the issue here only that the scale does not update?
How should a tool like this function for turns that are not in 90 degree increments?
Example image is included with scaleOverlayTool2.zip in raw format into exampleImageLoader.js file. image108Base64 It doesn't show good because I modified only pixel-spacing without change pixel-data but is enough to show error.
Free angle rotation in not included, but it could be simple to add like (see imageTools/rotate.js)
This could be related to #579
Prerequisites
Description
Scale Overlay Tool does not paint correctly when image is rotated on images with not square pixels.
Steps to Reproduce
Expected behavior: Scale Overlay Tool paint routines shall take into account current viewport spatial transformations. On function onImageRendered(e) imageAttributes.verticalMinorTick and imageAttributed.horizontalMinorTick shall be calculated using context transformation matrix of viewport.
Actual behavior: [What actually happened] Scale Overlay Tool draw bars taking into account rowPixelSpacing, colPixelSpacing and scale of an untransformed image.