wright-cemrc-projects / corr

CorRelator : TEM and FLM correlation desktop application
MIT License
8 stars 1 forks source link

Support Mosaic Images #24

Open wright-cemrc-projects opened 3 years ago

wright-cemrc-projects commented 3 years ago

SerialEM can produce a large image from tiled micrographs to cover the entire grid as a rough low-mag map.

We would like the ability to read and display these mosaic maps in CorRelator to more directly use the program for rough correlations. Currently this requires exporting and scaling the mosaic image as a single image to import. Target release in 2021q1 or q2.

  1. Parse the .st (mrc) format can include a stack of micrographs. Also parse metadata describing the translational relationship between the stacked images.

  2. Rendering tiled images with transformations in the PanAndZoomPane or new class. All existing image viewers use this component PanAndZoomPane. If it or a new class could be developed that can render tiles of images, and apply transformations on a layer of tiled images, that would allow displaying tiled images through the application.

JAI added supporting ideas for tiled images (https://www.informit.com/articles/article.aspx?p=23668&seqNum=10) and this could be a good guideline for how and when to draw tiles.

larsonmattr commented 3 years ago

With the 6/30/2021 release, CorRelator now supports the tile-based rendering of images and we should next parse the header of the SerialEM (.st) format to get the X,Y offsets for each tile where the image data of the tile is one of the layers of the stack of the .st file.

Next, should be a goal to update the drawing of the image to have Canvas dimensions match the viewport pixel dimensions, not the image dimensions. The mosaic image will likely be much larger than a 4k image and it seems like the JavaFX canvas dimensions depend on the video card memory causing the remaining issues with larger image viewing. By restricting the canvas dimensions to visible pixels and relying on x,y translation transformations when drawing the viewport it may be possible to fully address issues with larger images.