Plugin

Feature Extraction Engine

Publication ID: ICY-K2T7T2

Short Description

Simplify the 1D feature extraction task by exposing a simple feature extraction interface.

Documentation

Basic Usage

1. Select your sequence as input;

2. Select the axis which you want to extract features on that axis;

3. Select the Extraction Function you want to use, you can choose one from a list of Extraction Functions. Note: the list can be extended by developing a plugin which extended from "featureExtractionPlugin" class.

   Feature Extraction Functions have their own options, you can read it on their own documentation.

4. Select concat mode, this is used in case the extraction function will return a multi-channel image, you can choose a method to merge your multi-channel data.

Protocols

Every Feature Extraction function can be used in protocol, you can just search the name of the feature extraction name in protocols.

For example, you can build a plugin with "Sequence extractor" -> "EvaFE In Python" -> "Line Chart Display".

Developing your own feature extraction function

Developing Feature Extraction Function Plugin is extreamly easy.

Setup your developing environment according to: 

http://icy.bioimageanalysis.org/index.php?display=startDevWithIcy

 

New a "Icy Plugin" project with basic template.

Change your project properties, you need to add the following external jar files in your "Java Build Path->Libraries":

    1. ICY_HOME/icy.jar

    2. ICY_HOME/plugins/adufour/blocks/Blocks.jar

    3. ICY_HOME/plugins/adufour/ezplug/EzPlug.jar

    4. ICY_HOME/plugins/oeway/featureExtraction/FeatureExtractionEngine.jar

Copy the following template to your class file, and change the package name and class name according to your own settings:

package plugins.tutorial.FEPluginTutorial;

import plugins.oeway.featureExtraction.featureExtractionPlugin;

public class FEPluginTutorial extends featureExtractionPlugin {

    @Override
    public double[] process(double[] input, double[] position) {

        return input;
    }
}

The "input" is a array of data extracted from the current image, it depended on the input sequence and the axis you chose to extract. For example, if you want to write a plugin to calculate the "Mean Z-projection" of the input sequence. Your just need to write the following "process" function:

@Override
public double[] process(double[] input, double[] position) {

    double[] output = new double[]{ ArrayMath.mean(input)};

    return output;
}

Don't forget to "import icy.math.ArrayMath;" to make the mean() function work.

 

Build a plugin with options GUI

In order to add your own options in GUI, you need to add the following initialization function in your class, and you can add any Ezcomponent or Var<?> to the "optionUI":

    EzVarBoolean optionBool = new EzVarBoolean("hello world", false);
    @Override
    public void initialize(HashMap<String,Object> options,ArrayList
        optionUI.add(optionBool);
    }

Then you can use the option variable in your process function.

A complete example is like this:

package plugins.tutorial.FEPluginTutorial;
import icy.math.ArrayMath;

import java.util.ArrayList;
import java.util.HashMap;

import plugins.adufour.ezplug.EzVarBoolean;
import plugins.oeway.featureExtraction.featureExtractionPlugin;

public class FEPluginTutorial extends featureExtractionPlugin {
    EzVarBoolean optionBool = new EzVarBoolean("calculate mean", false);
    @Override
    public void initialize(HashMap<String,Object> options,ArrayList
        optionUI.add(optionBool);
    }
    @Override
    public double[] process(double[] input, double[] position) {
        if(optionBool.getValue())
            return input;
        else
        {
            double[] output = new double[]{ ArrayMath.mean(input)};
            return output;
        }
    }
}

A more detailed tutorial on using EzPlug varialbes can be refered here:

http://icy.bioimageanalysis.org/plugin/EzPlug_Tutorial

or 

http://icy.bioimageanalysis.org/plugin/EzPlug_SDK

Resources needing this

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog

Changelog

  • Version 3.1.3.0 • Released on: 2014-08-22 11:10:02
    Download
    Description:

    * change default axis of block

  • Version 3.1.2.0 • Released on: 2014-08-21 13:51:17
    Download
    Description:

    * change default axis to X

  • Version 3.1.0.0 • Released on: 2014-08-20 04:13:09
    Download
    Description:

    * now it's stoppable
    * and with progress display

  • Version 3.0.0.0 • Released on: 2014-08-19 15:05:02
    Download
    Description:

    * fixed bug of initialization

  • Version 2.9.6.1 • Released on: 2014-08-08 07:21:10
    Download
    Description:

    * change interface to double[]

  • Version 2.9.6.0 • Released on: 2014-08-07 08:19:13
    Download
    Description:

    * ugly fix of the listener triggering bug

  • Version 2.9.5.0 • Released on: 2014-08-06 18:47:16
    Download
    Description:

    × fix bug of event trigger in user plugin

  • Version 2.9.4.0 • Released on: 2014-08-06 13:56:52
    Download
    Description:

    * add listener to monitor user plugin

  • Version 2.9.3.0 • Released on: 2014-08-06 13:26:35
    Download
    Description:

    × fixed channel extract bug

  • Version 2.9.2.0 • Released on: 2014-08-06 09:37:39
    Download
    Description:

    * support live sequence to perform real-time processing

  • Version 2.9.1.0 • Released on: 2014-08-05 07:09:22
    Download
    Description:

    * Add example to listen to the variables

  • Version 2.9.0.0 • Released on: 2014-08-04 06:28:40
    Download
    Description:

    * add remove extra output

  • Version 2.8.0.0 • Released on: 2014-08-02 20:52:30
    Download
    Description:

    * add arraySplitor

  • Version 2.7.0.0 • Released on: 2014-08-01 19:04:08
    Download
    Description:

    * fixed channel name bug

  • Version 2.6.0.0 • Released on: 2014-08-01 18:41:26
    Download
    Description:

    * fix progress frame bug

  • Version 2.5.0.0 • Released on: 2014-08-01 18:26:14
    Download
    Description:

    * fix bugs

  • Version 2.4.0.0 • Released on: 2014-07-31 19:08:51
    Download
    Description:

    * User plugin extended from featureExtractionPlugin interface can be used as block in protocol

  • Version 2.3.0.0 • Released on: 2014-07-31 13:33:07
    Download
    Description:

    * fixed gui initialization bug

  • Version 2.2.0.0 • Released on: 2014-07-31 12:22:53
    Download
    Description:

    * update customize plugin options when invoke the engine from other plugin

  • Version 2.1.0.0 • Released on: 2014-07-31 12:01:02
    Download
    Description:

    * Plugins extended from featureExtractionPlugin now can invoke FeatureExtractionEngine from their own

  • Version 2.0.3.1 • Released on: 2014-07-31 10:54:25
    Download
    Description:

    * change JDK version to 1.6 to be capatible with lower version

  • Version 2.0.3.0 • Released on: 2014-07-31 08:36:31
    Download
    Description:

    * set metadata for output merged sequence

  • Version 2.0.2.0 • Released on: 2014-07-30 14:04:37
    Download
    Description:

    * multi-group bug fixed

  • Version 2.0.1.0 • Released on: 2014-07-30 13:47:33
    Download
    Description:

    * ignore illegal input

  • Version 2.0.0.0 • Released on: 2014-07-30 13:28:21
    Download
    Description:

    * Totally redesigned the engine, more stable
    * todo: multi-thread processing

  • Version 1.6.3.1 • Released on: 2014-07-29 21:39:34
    Download
  • Version 1.6.3.0 • Released on: 2014-07-29 20:55:25
    Download
    Description:

    * X, Y direction bug

  • Version 1.6.2.0 • Released on: 2014-07-29 19:35:11
    Download
    Description:

    * fixed bug with X axis

  • Version 1.6.0.0 • Released on: 2014-07-29 18:55:46
    Download
    Description:

    * changed interface to allow adding EzcCmponent rather than only EzVar
    * fixed bug in transform along X and Y

  • Version 1.5.4.0 • Released on: 2014-07-28 20:18:06
    Download
    Description:

    * skip output length check

  • Version 1.5.3.0 • Released on: 2014-07-28 20:08:40
    Download
    Description:

    * fix channel count error

  • Version 1.5.0.0 • Released on: 2014-07-28 19:40:14
    Download
    Description:

    * fix feature group bug

  • Version 1.4.0.0 • Released on: 2014-07-28 18:55:46
    Download
    Description:

    * fix feature count bug

  • Version 1.2.0.0 • Released on: 2014-07-28 18:23:12
    Download
    Description:

    × fix some bugs

  • Version 1.0.0.0 • Released on: 2014-07-28 13:57:00
    Download
    Description:

    * rename the plugin
    * support protocol block
    * other improvements

  • Version 0.0.1.0b • Released on: 2014-07-27 21:07:39
    Download