Save to my list
Unsave this
Created on
0
Apr 2018
Last activity
0
Dec 2018

Short Description

collection of routines used by other plugins of drosotrack: - drosotrack - capillarytrack - areatrack - roiroroiarray - 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

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:

NONE: no operation
R_RGB:    (RGB) -> R ; G_RGB: (RGB)-> G; B_RGB: (RGB)->B; RGB: (RGB) -> (R+G+B)/3    
H_HSB:     (RGB)->H; S_HSB: (RGB)-> S; B_HSB: (RGB)->S

R2MINUS_GB: (RGB) -> R*2 - (G+B); G2MINUS_RB: (RGB) -> G*2 -(R+B); B2MINUS_RG: B*2-(R+G)
GBMINUS_2R:  (RGB) -> (B+G)-2R; RBMINUS_2G: (RGB) ->(R+B)-2G; RGMINUS_2B: (RGB) -> (R+G)-2B
NORM_BRMINUSG: (RGB) ->((R/255 + B/255)-2G/255)*255
RTOGB: (RGB) ->(RRR)
            
REF_T0:  image(t) - image(t0); REF:  image(t) - image x; REF_PREVIOUS: image(t) - image(t-1)

XDIFFN:   pixel(x, y) = pixel (x (-3,-2-1)+x(3,2,1), y)
YDIFFN:   pixel(x,y) = pixel(x, y (-3,-2-1)+y(3,2,1))      
XYDIFFN:  pixel(x, y) = pixel (x (-3,-2-1)+x(3,2,1), y (-3,-2-1)+y(3,2,1))

RGB_TO_HSV: (RGB)-> (HSV); RGB_TO_H1H2H3: (RGB)->(H1H2H3) using Nicolas Hervé algorithms

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:

NHColorDistance
NHDistance
NHFeatureException
NHL1ColorDistance
NHL2ColorDistance

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.

 

Resources needing this

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog

Changelog

  • Version 0.0.1.23 • Released on: 2018-12-03 18:11:02
    Download
    Description:

    change of the buffer mechanism

    the last 2 versions were causing memory problems

  • Version 0.0.1.22 • Released on: 2018-11-27 16:56:52
    Download
    Description:

    bug solved in mouseoverlay (to allow mouse to select and add a color to a combobox)

  • Version 0.0.1.21 • Released on: 2018-10-22 18:17:38
    Download
    Description:

    reduce size of stack preloaded from 100 to 10

  • Version 0.0.1.20 • Released on: 2018-10-18 17:41:15
    Download
    Description:

    numerous small changes to solve bugs to recently introduced by deriving SequencePlus from SequenceVirtual instead of from Sequence

  • Version 0.0.1.19 • Released on: 2018-10-06 20:55:37
    Download
    Description:

    minor changes related to functions called by capillarytrack

  • Version 0.0.1.18 • Released on: 2018-09-28 07:47:04
    Download
    Description:

    rolling back changes made to imagetransform routines to re-enable dealing with images formatted as DataType.DOUBLE

  • Version 0.0.1.17 • Released on: 2018-09-24 22:48:58
    Download
    Description:

    change the way color distance is computed

  • Version 0.0.1.16 • Released on: 2018-09-23 21:49:44
    Download
    Description:

    new version including a cache mechanism to store temporary calculations of transformed images and thresholded images to improve the speed

  • Version 0.0.1.15 • Released on: 2018-09-21 18:20:57
    Download
    Description:

    numerous changes to classes dealing with image transformation and thresholding to make areatrack workable

  • Version 0.0.1.14 • Released on: 2018-09-19 10:33:51
    Download
    Description:

    intermediary version to solve bugs in areatrack. Modified:
    - imageThresholdTools
    - overlayThreshold

  • Version 0.0.1.13 • Released on: 2018-09-18 15:41:34
    Download
    Description:

    changes to imagetransform which had 1 routine suppressed and which needed an additional routine to transform images

  • Version 0.0.1.12 • Released on: 2018-09-17 19:08:24
    Download
    Description:

    new functions added, overlay, color distance (from N Herve), etc
    imagetransform
    imagethreshold
    combo box color renderer

  • Version 0.0.1.11 • Released on: 2018-08-11 09:12:34
    Download
    Description:

    (small) changes to filter routines

  • Version 0.0.1.10 • Released on: 2018-08-10 17:42:18
    Download
    Description:

    updated version of class - sequencePlus - needed by capillarytrack

  • Version 0.0.1.9 • Released on: 2018-08-06 17:13:16
    Download
    Description:

    change saveas (include a filter)

  • Version 0.0.1.8 • Released on: 2018-08-01 18:41:07
    Download
    Description:

    previous version was possibly wrong

  • Version 0.0.1.7 • Released on: 2018-08-01 18:36:33
    Download
    Description:

    new feature: multiple selection of xml files and add .xml when saving xml files (if missing)

  • Version 0.0.1.6 • Released on: 2018-07-30 10:24:58
    Download
    Description:

    minor updates

  • Version 0.0.1.5 • Released on: 2018-07-26 18:46:49
    Download
  • Version 0.0.1.4 • Released on: 2018-07-26 18:41:34
    Download
    Description:

    exporting classpath

  • Version 0.0.1.3 • Released on: 2018-07-26 09:50:35
    Download
    Description:

    ? install not working

  • Version 0.0.1.2 • Released on: 2018-07-26 09:40:28
    Download
    Description:

    functions added - bugs solved - etc

  • Version 0.0.1.1 • Released on: 2018-04-04 21:58:11
    Download
    Description:

    sequencevirtual with a dummy class extending Plugin

  • Version 0.0.1.0 • Released on: 2018-04-04 14:11:45
    Download