Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur
Register

User reviews

This plugin is not rated yet


Please log-in to post a review

Feature Extraction Engine

by Wei Ouyang

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

Publication Id
ICY-K2T7T2
See technical details
View complete changelog

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