allen-cell-animated / agave

Other
34 stars 6 forks source link

Show a scale bar #152

Closed toloudis closed 5 months ago

toloudis commented 11 months ago

Use Case

If spatial scale info is available, then we should have an option to add a scale bar as a viewport overlay.

Solution

In orthographic views this is fairly straightforward.

In perspective, we may have to consider bounding box tickmarks to match a scale bar ruler size. Otherwise there is no guide for measuring scale, due to perspective foreshortening.

Scale bar should be optional and show up in rendered images when active.

Alternatives

Consider only showing scale bar in ortho mode or in perspective only when bounding box tickmarks are visible.

TravisKroeker commented 9 months ago

This issue was brought up again in our forum 12/20/23:

"Is there a way to add a scale bar or otherwise measure the size of a zoomed in region in AGAVE? I would like to be able to show some insets of a larger image to illustrate some structural features but am unsure how I would describe the size of the insets.

Saving the zoomed inset as a JSON can recreate that region, so it seems like there might be a way to calculate the size from the JSON file values, but I am unclear on what each value represents.

Knowing the size of the images is necessary to be able to publish them as part of a manuscript, so any suggestions are greatly appreciated!"

https://forum.image.sc/t/agave-image-scale/90117