spacer.png, 0 kB
  spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB
The viewer4d: Viewing 4D (3D plus time) images with v4dlib PDF Print
Article Index
The viewer4d: Viewing 4D (3D plus time) images with v4dlib
Invoking the program, opening images
Viewing a sequence of images
Studying a complex image
Managing annotations
Exporting views
Compiling the program
License, Download, Authors

Invoking the program

Example of altered context menu in KDE on Linux.

The viewer4d is a program with graphical user interface. It can be, therefore, invoked directly (without any command line parameters). The next step will typically be clicking the File->Open item to pop up the Open dialog... However, the program accepts also command line parameters

The syntax is viewer4d [-command] [img1] [img2] ... [imgN] indicating an optional command as the first parameter followed by arbitrary many files. If no command is specified, the viewer4d starts with opened Open dialog in which the command line files will be pre-loaded into the middle panel. If, for instance, the command -seq is given, the viewer4d will try to directly open (without showing the Open dialog) the files from the command line as a sequence of images. Execute viewer4d --help or viewer4d.exe -help to see the current list of accepted commands. The utilization of the command line (and the commands) may prove useful when setting up associations between the viewer4d application and certain image file formats.

Opening images

The Open dialog has three main sections:

  • the filesystem browser in the left panel,
  • the list of images to be opened in the middle panel,
  • the specification of the semantics of the list in the right panel.

The filesystem (left) panel allows to navigate towards the files of interest either by clicking the directory tree or by using the (Directory chooser) button below. One may find it easier/faster to reach the desired folder via this button on some platforms, especially if the platform supports folder bookmarks (Note: one may set up a folder that would gather folder shortcuts on Windows; this folder would then act as a repository of folder bookmarks).

The image list (middle) panel is the main workhorse of the dialog. Here one may re-order the list items using the ensemble of buttons right to it. For clarity, the list displays only the filenames, in contrast to full paths. One may, however, display portion of the full paths by increasing the path separators number above. This may become handy when files in two folders are named the same. Example of the Open dialog in Windows operating system.

Note that the Sort button acts on the currently displayed texts. The sort function sorts the whole list if no item is selected, otherwise it sorts only within the selected items leaving the unselected ones untouched.

The semantics (right) panel allows to specify, in the Group mode subsection, how many images make up one frame. Try to click through the radio buttons and notice how the background colours are changing in the image list. Note that some image formats (e.g. Image Cytometry Standard, ICS) support to store a complex image as one file (in contrast to keeping real parts in one file while imaginary parts in the second file separately); choose Scalar single files in this case.
Example of the Open dialog in Linux operating system.
If a single frame is to be composed from two or more files, the "Move to 1st" button in conjunction with "Select these:" button becomes extremely useful. The latter selects only those items in the image list that match (=include the pattern) positively with the expression pattern right below the button. Note that the expression honours actually standard regular expressions. The former then moves the selected files to the first slots within the frames. The "Move to 2nd" button moves to the second slot, and so on.

Lastly, the content of the image list is, by default, understood as a list of frames to make up an image sequence. The whole content is hence attempted to load into a single instance/window of the viewer4d. If one checks the "Each group in own window", then every frame is opened in an individual instance of the program. This will pop up that many new viewer4d windows as how many frames are there displayed on the image list.

One may further ask to transpose the "z" and "t" axes of the image sequence, and may request to downsample the images. Both modifications happens on copies of the original images as they are read from hard disk prior storing them in the program memory. The copies are not stored on the hard disk.


See the demonstration short video to briefly get the idea of how the Open dialog was intended to be used.

Written by Vladimír Ulman   
Last Updated ( Friday, 23 October 2015 )
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB