Skip to content, Skip to search


ImgLib2 Examples

95 bytes removed, 19:39, 29 August 2015
Bring the list of requirements up to date
This page shows ten increasingly complex examples of how to program with ImgLib2. The intention of these examples are not to explain ImgLib2 concepts, but rather to give some practical hints how to work with the library and to grasp the principles in a learning-by-doing way.
All examples presented on this page are always entire classes including a main method to run them. Simply copying them into your favorite editor (e.g. the [[Script Editor]]) and compile & run them. The required Java libraries (jar files) are part of Fiji ImageJ and can be found in '''':
* imglib2 (the core)
* imglib2-algorithm (algorithms implemented in ImgLib2)
* imglib2-algorithm-gpl (GPL-licensed algorithms implemented in ImgLib2)
* scifio (input/output using Bio-Formatsfor reading and writing files)
* imglib2-ij (the ImageJ interaction)
* imglib2-realtransform (for example 8)
* ij (ImageJ 1.x core, used for display)
* mpicbg (for RealSum in example 3b)
and '''': * bioformats_plugins (OME [[Bio-Formats]]) Alternately, you can access the examples from the {{GitHub|org=imglib|repo=imglib-tutorials|label=ImgLib -tutorials Git repository}}. After cloning the source code, open the project in your favorite IDE. See [[Developing_ImglibDeveloping ImgLib2]] for further details.
== Example 1 - Opening, creating and displaying images ==
Bureaucrat, emailconfirmed, incoming, administrator, uploaders