View5D.jl - interface to View5D, an interactive data viewer
View5D.jl is a Java-based viewer for up to 5-dimensional data (including complex images). It supports three mutually linked orthogonal slicing displays for XYZ coordinates, arbitrary numbers of colors (4th dimension) which can also be used to display spectral curves and a time slider for the 5th dimension.
You can install the latest release via:
julia> ] add View5D.jl
or for the developer version:
julia> ] add https://github.com/RainerHeintzmann/View5D.jl
JavaCall.jl which needs a working java installation on your system. If you do not already have one,
you should install
OpenJDK and you may have to set the
JAVA_HOME variable to the installation directory on Windows.
Here is an image of how the viewer displays multidimensional data using connected orthogonal views. Note the various statistical information included real-space units (µm) displayed in the lower right information panel. And the bottom right panel displaying the various colormaps of this 4-channel image (data curtasy Kai Schink et al.).
julia> using View5D julia> view5d(rand(6,5,4,3,2)) # a viewer with 5D data should popp up julia> using TestImages julia> img1 = transpose(Float32.(testimage("resolution_test_512.tif"))); julia> img2 = testimage("mandrill"); julia> img3 = testimage("simple_3d_ball.tif"); # A 3D dataset julia> v1 = view5d(img1); julia> v2 = view5d(img2); julia> v3 = view5d(img3);
The interaction to julia is currently at a basic level of invoking the viewer using existing data. However, it already supports a wide range of data formats:
Tracking over Time
View5D also supports displaying and interacting with tracking in 3D over time (and other combinations) datasets. This can come in handy for single particle or cell tracking. A particularly interesting feature is that the data can be pinned (aligned) to a chosen track.
View5D has 3 context menus (main panel, element view panel and general) with large range of ways to change the display. A system of equidistant location (and brightness) information (scaling and offset) is also present but not yet integrated into julia.
Complex-valued data can be toggled between
imaginary part. A complex-valued array by default switches the viewer to a
gamma of 0.3 easing the inspection of Fourier-transformed data. However, gamma is adjustable interactively as well as when invoking the viewer.
See this YouTube Video for more details:
The Java viewer View5D has been integrated into Julia with the help of JavaCall.jl. Currently the viewer has its full Java functionality which includes displaying and interacting with 5D data. Generating up to three-dimensional histograms and interacting with them to select regions of interest in the 3D histogram but shown as a selection in the data. It allows selection of a gate
element where thresholds can be applied to which have an effect on statistical evaluation (mean, max, min) in other
elements if the
gate is activated.
It further supports multiplicative overlay of colors. This feature is useful when processed data (e.g. local orientation information or polarization direction or ratios) needs to be presented along with brightness data. By choosing a gray-valued and a constant brightness value-only (HSV) colormap for brightness and orientation data respectively, in multiplicative overlay mode a result is obtained that looks like the orientation information is staining the brightness. These results look often much nicer compared to gating-based display based on a brightness-gate, which is also supported.
Color display of floating-point or 16 or higher bit data supports adaptively updating colormaps.
Zooming in on a colormap, by changing the lower and upper display threshold, for some time the colormap is simply changed to yield a smooth experience but occasionally the cached display data is recomputed to avoid loosing fine granularity on the color levels.
List of some useful commands to interact with View5D from julia
view5d(): visualizes data. Via "mode" it can be selected whether a new viewer will be used (
mode="new") or the data is appended to the existing viewer via the element (
mode="add_time") or time direction (
mode="add_time"). Data can also be replacing currently displayed data (
mode="replace"), which is useful to display iterative updates.
process_keys(): the easiest way to remote-control the viewer by sending it key-strokes. Be careful: almost all keys have a meaning assigned and the viewer has no undo function.
set_display_size(): sets the size (in pixels) this viewer occupies on the screen.
set_title(): sets a new title to the viewer window.
to_front(): brings the viewer to the front
set_gamma(): sets the gamma display-value for a particular color channel (element)
set_min_max_thresh(): sets the minimum and maximum display value for a particular color channel (element).
import_marker_lists(): these functions allow you to display location information such as obtained from tracking algorithms.
- Current problems of
View5Dare that it is not well suited to displaying huge datasets. This is due to memory usage and the display slowing down due to on-the-fly calculations of features such as averages and the like.