Joachim de Fourestier1,2, Nabil Bassim1, Michael W. Phaneuf2
1Department of Materials Science and Engineering, McMaster University, Hamilton, Ontario, CANADA; 2Fibics Incorporated, Ottawa, Ontario, CANADA.
Using currently available open-source software libraries, one can build microscopy visualization tools such as a basic 3D Flip-book
style application, with relative ease. Web apps are cross-platform and easily allow for multiple users to have simultaneous access to the same application and data around the world. This in turn makes them widely popular and well supported on most platforms. OpenSeadragon© [1] is one of the most popular web-based high-resolution image viewers currently available. It can readily and efficiently deliver very large images (gigapixels or larger) using pyramids
where individual tiles are loaded as needed, downloading only the areas that are being displayed. This concept is used by IIIF (International Image Interoperability Framework) viewers [2], many of which are based on OpenSeadragon (originally Seadragon [3]). FIB-SEM tomography acquisitions can readily produce tens to hundreds of gigabytes of three-dimensional data. Having this online can benefit many because of the ability to share said large acquisitions online without having to share any large files, except for a simple web link. This talk will discuss the concepts and illustrate the steps involved in building a basic web viewer to share a 3D FIB-SEM tomography dataset based on the OpenSeadragon 3 package [4].
Take a peek at the viewer with 3D FIBSEM of a magnetite sample from El Laco, Chile.
Here we have instructions to show how to use the software and create your own OpenSeadragon-based 3D FIB-SEM data web-viewer exports (flipbook). The steps presented here assume you already have an image stack (as a folder with sequential image files represeting each slice) that has been acquired, aligned, and is ready to be shared.
cd C:\downloads\OSD_3D-Flip_viewer
if C:\downloads\OSD_3D-Flip_viewer is where you extracted the software package zip file.
stack2dzi.py "C:\Data\Project_01\Image_Stack01"
This will create the folder C:\Data\Project_01\Image_Stack01\OpenSeadragonViewer assuming your image stack folder was located at C:\Data\Project_01\Image_Stack01. Inside this folder, you will find a file named index.html, which you can double-click to open in your web-browser to view it. Note that we did not provide any scaling information, so the scale and slice thickness will likely be wrong.
stack2dzi.py "C:\Data\Project_01\Image_Stack01" -d "C:\MyDestination\Folder"
stack2dzi.py "C:\Data\Project_01\Image_Stack01" -p 0.15 -z 20.5
... where 0.15 is µm/px or 150 nm/px and 20.5 is a 20.5 nm/slice thickness. With the scaling information specified, the displayed scale bar and slice thickness information will be calculated and sized accordingly in the web-viewer.stack2dzi.py "C:\Data\Project_01\Image_Stack01" -p 0.15 -z 20.5 -d "C:\MyDestination\Folder"
This will produce a web-viewer export with a pixel size of 150 nm/px and a 20.5 nm slice thickness. The web-viewer export can then be launched by opening the index.html file located at C:\MyDestination\Folder\index.html in your web-browser of choice.
With a large tile size, the data is loaded more cohesively with less overhead since the number of requests are few, but it can be slow if the download/transfer speeds are slow since each request is large. Conversely with a small tile size, the data can be loaded quickly and progressively since each individual request is small and thus can complete sooner. However, each request has overhead and can result in even slower transfer speeds when there are too many requests at any one time. Additionally, each image file will have a minimum size due the given file format's overhead: this is usually small but can be considerable with thousands of images.
The tile size can be set using the -t option. You can experiment using the -s and -e options to generate smaller test exports. For example, using the following will generate an export starting at slice #17 and end with slice #27 - a total of only 11 slices:
stack2dzi.py "C:\Data\Project_01\Image_Stack01" -s 17 -e 27
For compressed greyscale JPEG tiles, a tile size of 1024px (~200 to 500 KB) works well on a modern high speed broadband connection (40 Mbps).
For more information, see [PubMed] Schüffler, Peter J et al. FlexTileSource: An OpenSeadragon Extension for Efficient Whole-Slide Image Visualization.
Journal of pathology informatics vol. 12 31. 14 Sep. 2021, doi:10.4103/jpi.jpi_13_21
Contents include the Stack2DZI python script along with the 3D-Flip OpenSeadragon web-viewer package: OSD_3D-Flip_viewer.zip (~18MB) (revision 2022/08/31 5:17 PM)
Released under the MIT License. Used open source software (mainly OpenSeadragon, jQuery, and libvips) are included along with their licensing information as well in the download file.
Copyright 2022 Fibics Incorporated, Joachim de Fourestier (jdefourestier{at}fibics.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ZEISS Atlas 5 will provide the ability to make 3D flip Enhanced Browser-Based Viewer (E-BBV) exports. [Work in Progress]
If you have any questions or issues, you can send an email to jdefourestier {at} fibics.com