DrosoSequence

Short Description

collection of routines used by other plugins of drosotrack:
– drosotrack
– capillarytrack
– areatrack
– roitoroiarray
– buildkymos
One of the major classes is virtualSequence, which is a hack of the regular sequence to load only 1 image at a time (stack o avi).

Documentation

SequenceVirtual is composed of a series of classes used by fmp plugins:

1) Sequence-related classes

SequenceVirtual Plugin

This plugin written with EzPlug allows to open a stack of files (jpg) or and avi with sequenceVirtual. The viewer can browse through the stack. It can also load ROIs (line and polygons) from proprietary files (called capillarytrack.xml and drosotrack.xml).

SequenceVirtual

SequenceVirtual is at the core of functions which allow one to open a stack of jpg files or an avi files as a virtual file. As for ImageJ virtual stacks, all data are not stored in memory at once, but just a buffer of 100 images which is continuously updated using a separate thread. This class extend Sequence, adding a few functions to manipulate images from this stack, to build a list of file names of images within a directory, and to store and read data used by different plugins such as CapillaryTrack. It also saves xml files with parameters and data as well as ROIs, generated by these different plugins. Also taylored to work with these specific plugins, it could be stripped of these functions to make it more generic as it piggy backs Sequence functions. The threading mechanism is adapted/borrowed from Fabrice de Chaumont MiceTrack plugin.

SequencePlus

SequencePlus is another extension of Sequence, that stores and handle ROIs and data arrays used by CapillaryTrack, to manipulate measures made on kymographs.

2) Image-operations classes

A series of 4 classes is used to manipulate images and perform simple operations on them. These classes are used to let the user define interactively an image filter to create a mask, and then to run a threshold over the mask to count the number of pixels thus filtered. These classes are mostly used within the plugins AreaTrack, DrosoTrack and CapillaryTrack. The idea behind this is to make a pipeline with 2 steps, with a first pass where an image is transformed or filtered, and a second pass where a threshold is applied to the transformed image.

ImageOperations

This class is used as a stub to pass parameters to ImageTransformTools or ImageThresholdTools, parameters which are stored in the class ImageOperationsStruct. In order to speed up the operations, the calls to the different functions can be cached (or not) by storing the results of the different operations into images saved in an associated SequenceVirtual object.

ImageOperationsStruct

This class defines a series of parameters which are used to call the image transform and thresholding operations, as well as a couple of elemental operations which facilitate their use.

ImageTransformTools

This class groups a series of functions that either take an image from a SequenceVirtual object, or an IcyBufferedImage and returns a transformed image. The operations currently available are defined in an enum list (TransformOp) as:

ImageThresholdTools

This class regroups 2 ways to threshold an image: by comparing each pixel to a single threshold, or by comparing each pixel to a series of reference colors + a distance, using algorithms designed by Nicolas Herve. These functions return a binary array as an IcyBufferedImage. This buffer can be transformed into a boolean array.

3) Color classes

This set of classes are cut and paste (with minor modifications) of Nicolas Herve toolboxes classes used in his plugin. These classes are named:

In addition, the class ComboBoxColorRenderer is used to store and display colors picked by a user on an image, within a combobox.

4) Overlay classes

Three overlay classes are used to display a mask over an image

OverlayColorMask: this overlay masks all pixels which have colors close to a list of colors
OverlayThreshold: this overlay shows all pixels which are lower than a threshold applied on a transformed image
OverlayTrapMouse: this overlay is used to trap mouse events (in order to pick the color of a pixel)

5) Additional functions

Line2DPlus: computes x when given y from a line defined by 2 points & get the intersection between 2 lines defined each by 2 points.

StringSorter: sort strings alphabetically, or numerically – these routines are used to sort file names collected from a directory

Tools: get a list of files given a filter, save file as dialog, comparator of lines, comparator of ROI names, ranking of doubles, strings), order vertices of a polygon, choose a directory dialog.