• Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
We believe watching some examples is the better way to understand how to program plugins for Icy !
So for each topic we provide a brief description and basic tutorials.

Before getting further you need to set up your Icy development environment by following this step-by-step tutorial.

All examples described here are available in the Plugin Tutorials GitHub project and you can also download and test them in Icy by using the tutorial keyword in the plugin browser or search bar.

Topics

  Plugin
  Image structure
  Region of Interest
  Overlay
  GUI
  Image representation
  Event
  Chart / Graphic
  Miscellaneous
  Javadoc (package representation)

Plugin

Plugin is the way for developer to provide new features in the application.
For that you have to extend the base Plugin class so your program could be installed and used in Icy.
PluginActionable is the base class for plugin which should be visible in the GUI interface so we can launch them from a button.
Don't forget to check available interface for Plugin as PluginDaemon, PluginSearchProvider or PluginROI to enable specific behavior on your plugin.

Documented source code examples
  Hello World Plugin
  Getting the list of registered plugin

Others interesting classes to see
  PluginLoader is used to detect and load all plugin classes in Icy, you can use it to request information about installed plugins.
  PluginLauncher is used to launch plugin.
  PluginInstaller is used to install / update / remove plugin.

Image structure

The basic image classes of Icy are the Sequence and the and IcyBufferedImage.
The Sequence class allows the definition of an image over the 5 [XYCZT] dimensions.
It contains a list of and IcyBufferedImage and maintain a [Z,T] position for each of them.



The IcyBufferedImage object overrides the AWT BufferedImage object so it remains compatible with the available API as image transformation and processing. Still only JAI actually seems to support our image format, AWT API seems limited to most common image formats only. So basically IcyBufferedImage offers the same features as BufferedImage with expanded image format support and also adding many methods for easier image data access and manipulation.
Data are organized in channel (one data array per channel) so for a classical ARGB image we have 4 channels --> 4 arrays (byte data here).
We retained this organization because almost time the image processing algorithm work on a channel basis.

IcyBufferedImage internally uses IcyColorModel class, this structure is responsible of the image data storage and can be of any type:
- unsigned byte 8 bits [0 .. 255]
- signed byte 8 bits [-128 .. 127]
- unsigned short 16 bits [0 .. 65535]
- signed short 16 bits [-32768 .. 32767]
- unsigned int 32 bits [0 .. 4294967295]
- signed int 32 bits [-2147483648 .. 2147483647]
- float 32 bits [0 .. 1] (default but can be anything else)
- double 64 bits [0 .. 1] (default but can be anything else)

We also defined our own IcyColorSpace class (inherit from ColorSpace) which allow a versatile color representation of the image data by using ARGB ColorMap and value bounding (sort of threshold) per channel.

Documented source code examples
  How to Generate images of all type available
  How to do a very basic intensity operation on an image whatever is the data type of the image
  Another example of generic image processing whatever is the image format

Others interesting classes to see
  SequenceUtil Sequence utilities class.
  IcyBufferedUtil IcyBufferedImage utilities class.

Region of interest

Region of interest define region which can be used as input or output for any processing.

  ROI Base roi class from which every ROI derive.
  ROI2D / ROI3D / ROI4D / ROI5D Base class for 2D / 3D / 4D / 5D roi.
  ROI2DShape Base class for all shape style 2D roi (ROI2DRectangle, ROI2DEllipse, ROI2DPolygon...)
  ROI2DArea Area style 2D roi class.

Documented source code examples
  Processing data from roi: fast build of the mask
  Creating an area roi from code
  Creating an overlay displaying intensity chart of the pixel over roi

Others interesting classes to see
  BooleanMask2D 2D boolean mask class, used internally by ROI for boolean operations and others calculations.
  RoiUtil Roi utilities class which is used to compute some basic operations.

Overlay

The overlays are used to interact and draw rich information on image, the base Overlay class replaces the deprecated AbstractPainter class and Painter interface.

Documented source code examples
  How to create a simple overlay over an image (sequence)
  How to create a more advanced overlay to react on mouse events
  Fancy animated overlays creation
  Create overlays for VTK (3D display)

Others interesting classes to see
  Anchor2D Example of overlay which can be used to move objects over the sequence.
  VtkPainter Interface for easier handling of overlay in a VTK Canvas (3D rendering).

GUI

Icy uses the Swing API for the UI with a specific third library look and feel: Substance.
This look and feel provides a consistent and nice GUI so Icy looks exactly the same whatever is the underlying Operating System.
Icy provides some tools to help in designing Swing GUI which may be paintful when you do it yourself by hands.
One of the most important one is the EzPlug plugin which automatically generate the GUI depending your inputs.
You can see it in action in the EzPlug Tutorial plugin.

Documented source code examples
  Simple action frame example.
  How to use a template to have a simple plugin with an action button

Others interesting classes to see
  Viewer Frame used to display an image in Icy.
  IcyFrame Base frame class in Icy, provide some facilities as the "externalization" feature.
  ActionFrame / ActionDialog Simple action frame / dialog (with ok / cancel button couple).
  AnnounceFrame Display an annoucement message in the bottom right of the application.
  ToolTipFrame Display a tooltip in the bottom right of the application.
  ConfirmDialog / IdConfirmDialog Simple confirmation dialog.
  ImageLoaderDialog Dialog used to choose the image to open.
  ImageSaverDialog Dialog used to select where save an image.
  GuiUtil Tools to generate customized label, textarea or panel easily, no used that much now.
  LookAndFeelUtil Tools related to the look and feel (Icy uses the Substance LAF library).
  ComponentUtil Tools and helpers for Swing components (size, position, decoration...).
  WindowPositionSaver Helper for window position / state saving.

Interesting packages to browse
  icy.gui.frame Package containing custom Icy frames.
  icy.gui.frame.progress Package containing custom Icy progress frames (frame display in bottom right corner).
  icy.gui.dialog Package containing custom Icy dialog.
  icy.gui.component Package containing custom Icy components.
  icy.gui.util Package containing tools for GUI.

Image representation

To display an image Icy use the IcyCanvas class which actually take an image as input and render it to the screen.

By default we have 2 available canvas:
  Canvas2D Classic 2D image display.
  Canvas3D Real time 3D rendering for stack image (using the VTK library).

We can directly provide new canvas from plugin by implementing the PluginCanvas interface so they will appears in the canvas selection of the viewer.
A canvas class should extends IcyCanvas / IcyCanvas2D / IcyCanvas3D... depending the final representation adopted but it may eventually directly extends Canvas2D and modify a bit of its behavior if that match the requirements.

Example plugins (sources code provided in jar file)
  Montage2D
  Chart1DCanvas

Event

Java as many Object Oriented language relies a lot on events and same goes for Icy which use them internally.
You may be interested in launching an action on a specific event (as "image opened" event).

Documented source code examples
  How to listen major events in Icy
  How to listen focused image / window events in Icy

Chart / Graphic

You may want to present your statistical results from your analysis in graphical format, for that Icy use the very nice and comprehensive JFreeChart library to do it.

Documented source code examples
  Create a simple graph with JFreeChart in Icy
  Create a deviation graph with JFreeChart in Icy

Misc

Here are others topics which may have some interests for plugin development, be sure to check in them before reinventing the wheel !

Interesting packages to browse
  icy.math Mathematical related stuff (many tools and helper classes).
  icy.network Network stuff and utilities.
  icy.ImageJ ImageJ wrapper utilities.
  icy.type Basic type declaration and utilities.
  icy.type.collection.array Array type declaration and utilities.
  icy.util General and misc utility classes.

Interesting classes to know about
  ArrayUtil / Array1DUtil / Array2DUtil... Array conversion, allocation... utilities.
  SearchEngine global search engine in Icy (access it through the main interface : Icy.getMainInterface().getSearchEngine())
  Clipboard system and local clipboard.
  XMLPreferences base class to store preferences in Icy.
  It uses a similar syntax than standard java Preferences object but store them in XML format instead.
  XMLUtil General XML utilities to build or read XML files.
  XLSUtil General XLS utilities to build or read excel documents.

Javadoc

Packages 
Package Description
icy.action
Contains all Icy action command classes which are accessible through the search bar
icy.canvas
Contains base Icy canvas and related classes
icy.clipboard
Contains clipboard tools classes
icy.common
Contains common shared object and classes in Icy
icy.common.exception  
icy.common.listener
Contains common shared listener in Icy
icy.common.listener.weak
Contains common shared weak listener in Icy
icy.doc  
icy.file
Contains all file operation tools and related objects
icy.file.xls  
icy.file.xml  
icy.gui.component
Contains all custom components related classes (component, UI, renderer, editor...)
icy.gui.component.button
Contains custom button components
icy.gui.component.editor
Contains custom UI Editor
icy.gui.component.math
Contains custom UI components for mathematical stuff
icy.gui.component.menu
Contains custom menu components
icy.gui.component.model
Contains custom UI Model
icy.gui.component.pool
Contains graphical component related to the Icy swimming pool
icy.gui.component.renderer
Contains custom UI Renderer
icy.gui.component.sequence
Contains custom UI components for the Icy Sequence object
icy.gui.component.ui
Contains custom component UI
icy.gui.dialog
Contains all custom Dialog (modal frame)
icy.gui.frame
Contains all custom Frame (non modal)
icy.gui.frame.error
Contains custom frames for Error handling
icy.gui.frame.progress
Contains custom progress frames (see TaskFrameManager)
icy.gui.frame.sequence
Contains custom frames for Sequence action / selection...
icy.gui.inspector
Contains all classes and components related to the Icy inspector
icy.gui.lut
Contains all graphic components related to the Icy LUT (Look Up Table)
icy.gui.lut.abstract_  
icy.gui.main
Contains graphic components and objects for the main interface
icy.gui.math
deprecated
icy.gui.menu
Contains graphic components and objects related to the main (Ribbon) menu
icy.gui.menu.search
Contains graphic components and objects related to the global search bar
icy.gui.menu.tools
Contains specific graphic components related to menu actions
icy.gui.plugin
Contains graphic components and objects related to Plugin
icy.gui.preferences
Contains all preferences panels and frames
icy.gui.sequence
Contains all Sequence related graphic components and tools
icy.gui.sequence.tools
Contains all Sequence related graphic components tools
icy.gui.system
Contains some system related graphic components as the memory monitor and the output console
icy.gui.util
Contains common GUI tools (LAF, Swing, position saver...)
icy.gui.viewer
Contains all components and classes related to the Icy Viewer
icy.image
Contains all Image related stuff as the Icy image data structure, ColorModel, ColorSpace, ColorMap, Image tools...
icy.image.cache  
icy.image.colormap
Contains the Icy Colormap structure definition and all default Icy colormap
icy.image.colormodel
Contains the base Icy ColorModel structure definition and the different supported ColorModel
icy.image.colorspace
Contains the base Icy ColorSpace structure definition and related objects
icy.image.lut
Contains the Icy LUT definition (Colormap container)
icy.imagej
Contains all ImageJ related stuff (wrapper, integration...)
icy.imagej.patches
Contains runtime ImageJ patches to improve integration and communication with Icy
icy.itk
Contains ITK library related stuff
icy.main
Contains the main Icy class, responsible of the Icy application launch process (also contains the Icy version information)
icy.math
Contains mathematical tools and related objects (Histogram, Interpolator, Scaler, FPSMeter...)
icy.network
Contains network tools and related objects (download / upload operation, IRC...)
icy.painter
Contains Icy Overlay / Painter structure definition and basics Overlay helper classes
icy.plugin
Contains Plugin class model and attached interfaces.
icy.plugin.abstract_
Plugin abstract classes
icy.plugin.classloader
Plugin class loader and associated objects
icy.plugin.classloader.exception
Exceptions attached to the Plugin Loader
icy.plugin.interface_
All supported plugin interface to specialize plugin in a specific task (Canvas, ROI, file importer...)
icy.preferences
Contains all Preference definition classes
icy.resource
Contains resources definitions and tools
icy.resource.icon
Contains icon resources definitions and related objects
icy.roi
Contains all ROI (Region Of Interest) related classes and tools
icy.roi.edit  
icy.script
Script stuff (deprecated)
icy.search
Contains Search engine related classes
icy.sequence
Contains Icy Sequence structure definition and associated objects / tools.
icy.sequence.edit
Contains Icy Sequence Edit structure definitions.
icy.swimmingPool
Contains Swimming Pool related objects and tools.
icy.system
Contains System related objects and tools (Thread, Profiling, Security, Exception...)
icy.system.audit
Contains Audit tools (usage statistics for application and plugin)
icy.system.profile
Contains Profile objects and tools (performance measurement mainly)
icy.system.thread
Contains Thread related objects and tools (asynchronous processing, EDT safety, Processor...)
icy.type
Contains custom data type definition and tools for generic and multi dimensional array manipulation
icy.type.collection
Contains collection type definition and tools (List, generic arrays...)
icy.type.collection.array
Contains array type definition and tools (generic arrays, dynamic arrays...)
icy.type.collection.list
Contains custom List type definition (RecentList and RecentFile type)
icy.type.dimension
Contains Dimension class definition up to 5D
icy.type.geom
Contains extended geometric classes (Polygon2D, Polyline2D, Line3D...)
icy.type.point
Contains Point class definition up to 5D
icy.type.rectangle
Contains Rectangle class definition up to 5D
icy.type.value
Contains abstract value type definition (support Comparable and XML Persistence interfaces)
icy.undo
Contains Undo management objects and tools for Icy
icy.update
Contains all classes and tools used to allow update of plugins, libraries and application core
icy.util
Contains common utilities classes (String, XLS, XML, ZIP, JAR, OME, Graphics, Date, Shape, Class...)
icy.vtk
Contains VTK library related stuff (wrapper, tools)
icy.workspace
Contains Workspace objects definition and tools
plugins.kernel.canvas
Contains all canvas type plugins for the kernel
plugins.kernel.importer
Contains all Importer type plugins for the kernel
plugins.kernel.roi.descriptor.intensity
Contains ROI Descriptor plugins for intensity informations (kernel)
plugins.kernel.roi.descriptor.measure
Contains ROI Descriptor plugins for basic size measurements (kernel)
plugins.kernel.roi.descriptor.property
Contains ROI Descriptor plugins for ROI properties (kernel)
plugins.kernel.roi.roi2d
Contains all 2D ROI classes included in the kernel
plugins.kernel.roi.roi2d.plugin
Contains all 2D ROI plugin classes included in the kernel
plugins.kernel.roi.roi3d
Contains all 3D ROI classes included in the kernel
plugins.kernel.roi.roi3d.plugin  
plugins.kernel.roi.roi4d
Contains all 4D ROI classes included in the kernel
plugins.kernel.roi.roi5d
Contains all 5D ROI classes included in the kernel
plugins.kernel.roi.tool  
plugins.kernel.roi.tool.plugin  
plugins.kernel.searchprovider
Contains all Search Provider plugins included in the kernel.
plugins.tutorial  
plugins.tutorial.basics  
plugins.tutorial.chart  
plugins.tutorial.event  
plugins.tutorial.gui  
plugins.tutorial.painter  
plugins.tutorial.roi  
plugins.tutorial.training  
plugins.tutorial.undo  
plugins.tutorial.vtk  
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes