dicom-microscopy-viewer icon indicating copy to clipboard operation
dicom-microscopy-viewer copied to clipboard

[Feature Request] Ability to Mirror Whole Slide Microscopy Images (Horizontal & Vertical)

Open realvgm opened this issue 4 months ago • 5 comments

Description: We would like to request a new feature for dicom-microscopy-viewer: the ability to mirror images horizontally and/or vertically within the viewer.

This functionality would be very helpful when reviewing Whole Slide Microscopy (WSI) images that use a DICOM pyramid configuration, as it would allow users to visually inspect tissue samples from different perspectives and match them with other systems or images that present mirrored orientations.

Use Case / Motivation:

  • Users may need to flip or mirror slides to compare with results from other viewers or image sources that have different orientation conventions.
  • In pathology workflows, it is common to rotate or mirror slides to better match physical slide orientation on microscopes.
  • Having this feature in the viewer would improve usability, reduce cognitive load, and make side-by-side comparison with other tools much easier.

Proposed Solution / Idea:

  • Add two new toolbar buttons (or menu options):
  1. Mirror Horizontally (flip along vertical axis)
  2. Mirror Vertically (flip along horizontal axis)
  • Alternatively, expose these as API functions so they can be triggered programmatically.

The feature could apply to all pyramid levels simultaneously so that navigation and zoom remain consistent after mirroring.

Questions:

  • Is this feature already on your roadmap?
  • Would you accept a contribution/PR implementing it if we were to prototype it?
  • Do you know of any recommended workaround to achieve a similar effect today?

Additional Context: Our use case involves large DICOM WSI images (multi-resolution pyramid). The ability to flip orientation without exporting and re-processing the image would be a great improvement for workflow efficiency.

realvgm avatar Sep 16 '25 09:09 realvgm

Can you please confirm you need the ability to mirror as opposed to rotate the slide?

We were considering changing the default orientation of the slide to make Slim more consistent with the other viewers. But (in my view as someone who is not a pathologist) mirroring seems to be a potentially dangerous operation that might affect reporting on the slide.

fedorov avatar Sep 16 '25 12:09 fedorov

Thank you for your quick reply!

Yes — to clarify, we are specifically requesting the ability to mirror (flip) the image, either horizontally (X-axis) or vertically (Y-axis), not rotation (we are aware rotation is already implemented).

For our users, this feature is very important:

  • There are other WSI/DICOM-SM viewers that already provide this functionality.
  • Some user workflows benefit significantly from being able to flip the slide, for example when comparing mirrored anatomical regions or aligning the view with external references.
  • This is not just a “nice-to-have” but part of the routine for some pathologists and reviewers.

We completely understand the concern about accidental misuse, but we believe it could be implemented safely (e.g., with a clear visual indicator when a flip is active).

Would it be possible to consider adding this to the roadmap?

realvgm avatar Sep 16 '25 13:09 realvgm

Thank you for the clarification. I discussed this with @DanielaSchacherer, and she pointed me to a discussion of implementing this feature QuPath (interestingly enough, the lead developer of QuPath also never had a need for mirroring prior it was raised): https://forum.image.sc/t/flipping-an-image-in-qupaths-gui/85110.

There are other WSI/DICOM-SM viewers that already provide this functionality.

Could you list those viewers?

Would it be possible to consider adding this to the roadmap?

Our engineering resources are extremely constrained. The features we are adding are primarily driven by the new datasets prioritized for ingestion into Imaging Data Commons, or bugs identified while working with IDC data. We will discuss the issue internally, and if we are convinced this feature makes sense, we would welcome your contribution.

fedorov avatar Sep 16 '25 14:09 fedorov

Could you list those viewers?

  • Hamamatsu NDP.view2
  • Olympus OlyVIA

If you like, we can reach out to our pathology team to survey what viewers they are currently using, and which ones they need this flip/mirror capability in. That would help estimate how many users this feature would help.

Finally, yes—it seems reasonable to consider this for the roadmap, especially if we can scope it modestly (e.g. one flip axis first, or implement as a “view transform” rather than reencoding) so as not to overload engineering resources.

Thanks again for considering this. If you want, I can draft a lightweight spec / PR suggestion to reduce the dev effort.

Best regards,

realvgm avatar Sep 16 '25 14:09 realvgm

We discussed this internally today, and we agree these would be good additions.

We do not have resources to prioritize this development, but your PR contributing this functionality is welcomed!

fedorov avatar Sep 16 '25 16:09 fedorov