comparison readme.md @ 0:93b416f8e9e3 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit b08f0e6d1546caaf627b21f8c94044285d5d5b9c-dirty"
author imgteam
date Tue, 17 Sep 2019 17:00:19 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:93b416f8e9e3
1 Galaxy wrappers for ImageJ2 tools
2 ==================================
3
4 ImageJ2 is a new version of ImageJ for the next generation of multidimensional image data, with a focus on scientific imaging. Its central goal is to broaden the paradigm of ImageJ beyond the limitations of ImageJ 1.x, to support the next generation of multidimensional scientific imaging.
5
6 Fiji is an image processing package. It can be described as a "batteries-included" distribution of ImageJ (and ImageJ2), bundling Java, Java3D and a lot of plugins organized into a coherent menu structure. Fiji compares to ImageJ as Ubuntu compares to Linux.
7
8 More informations is available at:
9
10 * [http://fiji.sc/ImageJ2](http://fiji.sc/ImageJ2)
11 * [http://fiji.sc/Fiji](http://fiji.sc/Fiji)
12
13
14 Installation
15 ============
16
17 Galaxy tool wrappers use specified Fiji Lifeline versions available from [http://fiji.sc/Downloads](http://fiji.sc/Downloads). Galaxy should be able to automatically install this package.
18
19 The wrappers are available at [https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2](https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2).
20
21
22 Use Docker
23 ==========
24
25 A docker image that installs Galaxy with these imaging tools is available at [https://github.com/bgruening/galaxy-imaging](https://github.com/bgruening/galaxy-imaging).
26
27
28 Using Fiji with Galaxy tools
29 ============================
30
31 Galaxy ImageJ2 tool wrappers generate a command line that calls a Python script, passing it a series of arguments including a Jython script named jython_script.py that resides in the same directory as the tool wrapper. During tool execution, the Python script will call ImageJ2 with the --headless argument to run without the ImageJ2 GUI. The Jython script is also passed to ImageJ2 along with all command line arguments that it expects. ImageJ2 will execute the Jython script, passing the expected arguments. The command line to run ImageJ2 from a Galaxy tool wrapper looks something like this:
32
33 `ImageJ2 --ij2 --headless --jython ~jython_script.py arg1, arg2, ...`
34
35 Each tool execution starts the ImageJ2 application within a Java virtual machine (JVM). When ImageJ2 is finished processing the Jython script, the results are either written to a file or returned to the calling Galaxy process. The JVM is shut down, and the Galaxy job terminates. This approach provides the ability to run ImageJ2 tools from Galaxy on any supported HPC environment.
36
37 Of course, eliminating the ImageJ2 GUI restricts us to wrapping only those ImageJ2 plugins that do not require any GUI components (i.e., the ImageJ2 window manager). Plugins are written by an open community, so not all of them are written in such a way that they can be executed from the command line and produce useful results. For example, some plugins create one or more images that can only be accessed via calls to the ImageJ2 window manager, and running in headless mode eliminates the window manager as well as other GUI components.
38
39 Those familiar with ImageJ2 will find differences with this general pattern for executing ImageJ2 tools within Galaxy. ImageJ2 accounts for user defined global preferences which are available to tools throughout the session, and an image can be uploaded and run through any number of available tools, saving only the final image. While Galaxy currently does not account for user preferences defined in ImageJ2, enhancements to the Galaxy framework are planned that will accomodate these kinds of settings (e.g., binary image options). Also, since Galaxy initiates a new ImageJ2 session with each tool execution, initial images are uploaded to ImageJ2 and resulting images are saved for each tool execution.
40
41 The Galaxy ImageJ2 tools currently fall into the following categories. Additional tools will be added at a steady pace.
42
43 Working with Pixels
44 ===================
45 These Galaxy tools wrap the ImageJ2 plugins that are available in the ImageJ2 Process → Math menu.
46
47 * **Operate on pixels** - Applies a mathematical expression (add, subtract, multiply, etc.) to each pixel in the image. When the resulting pixel value overflows/underflows the legal range of the image's data type, the value is reset to the maximum/minimum value.
48
49 Filters and Effects
50 ===================
51 These Galaxy tools wrap the ImageJ2 plugins that are available in the ImageJ2 Process menu.
52
53 * **Smooth** - Blurs the image by replacing each pixel with the average of its 3x3 neighborhood.
54 * **Sharpen** - Increases contrast and accentuates detail in the image, but may also accentuate noise.
55 * **Find Edges** - Uses a Sobel edge detector to highlight sharp changes in intensity in the active image.
56 * **Add shadow effect** - Produces a shadow effect, with light appearing to come from the selected direction (East, North, Northeast, Northwest, South, Southeast, Southwest and West).
57 * **Find Maxima** - Determines the local maxima in an image and creates a binary (mask-like) image of the same size with the maxima (or one segmented particle per maximum) marked.
58 * **Enhance contrast** - Enhances image contrast by using either normalization (contrast stretching) or histogram equalization.
59 * **Add or remove noise** - Adds specified noise to or removes noise from images.
60
61 Binary Image Tools
62 ==================
63 These Galaxy tools wrap the ImageJ2 plugins that are available in the ImageJ2 Process → Binary menu.
64
65 * **Convert to binary** - Converts an image into a binary (black and white) image.
66 * **Adjust threshold** - Sets lower and upper threshold values, segmenting grayscale images into
67 features of interest and background.
68 * **Watershed segmentation** - Automatically separates or cuts apart particles that touch.
69 * **Analyze particles** - Analyzes the particles in a segmented binary image, providing information about
70 each particle in the image.
71 * **Skeletonize images** - Uses the Skeletonize3D plugin to find the centerlines (”skeleton”) of objects in the input image. Skeletonize3d is a plugin written by Ignacio Arganda-Carreras that offers several advantages over the legacy skeletonization algorithm of ImageJ available in the Process → Binary → Skeletonize menu item. Skeletonize works only with binary 2D images. Skeletonize3D works with 8-bit 2D images and stacks, expecting the image to be binary. If not, Skeletonize3D considers all pixel values above 0 to be white (255). While Skeletonize↑ relies on Black background value, the output of Skeletonize3D always has a value of 255 at the skeleton and 0 at background pixels, independently of the Black background option.
72 * **Analyze skeleton** - Tags all pixel/voxels in a skeleton image and then counts all its junctions,
73 triple and quadruple points and branches, and measures their average and maximum length.
74 * **Convert binary image to EDM** - Converts a binary image into a 8-bit grayscale Euclidean Distance Map (EDM). Each foreground (nonzero) pixel in the binary image is assigned a value equal to its distance from the nearest background (zero) pixel.
75
76 **Interpreting binary Images in ImageJ2**
77
78 Binary images are thresholded to only two values, typically 0 and 1, but often — as with ImageJ — 0 and 255, that represent black and white on an 8-bit scale.
79
80 The interpretation of binary images is not universal. While some software packages will always perform binary operations on 255 values (or 1, or any non-zero value), ImageJ takes into account the foreground and background colors of the binary image.
81
82 In ImageJ, the **Black background** global preference setting defines not only how new binary images will be created, but also how previously created images are interpreted. This means objects will be inferred on a image-per-image basis. As such, inverting the LUT (i.e., pixels with a value of zero are white and pixels with a value 255 are black) of a binary image without updating the black background option may lead to unexpected results. This issue can currently be avoided by properly selecting the **Black background** option available on all Galaxy binary image tools.
83
84 BunwarpJ Plugin Tools
85 =====================
86 These Galaxy tools wrap the bUnwarpJ plugin [http://fiji.sc/BUnwarpJ](http://fiji.sc/BUnwarpJ).
87
88 * **Adapt an elastic transformation** - Adapts an elastic transformation to a new image size by transforming the
89 coefficients of a specified elastic transformation according to a real image factor.
90 * **Align two images** - Performs a simultaneous registration of two images, A and B. Image A is elastically deformed
91 in order to look as similar as possible to image B, and, at the same time, the "inverse"
92 transformation (from B to A) is also calculated so a pseudo-invertibility of the final deformation
93 could be guaranteed. Two images are produced: the deformed versions of A and B images.
94 * **Compare opposite elastic deformations** - Calculates the warping index of two opposite elast transformations, i.e. the average of the geometrical distance between every pixel and its version after applying both transformations (direct and inverse).
95 * **Compare elastic and raw deformation** - Calculates the warping index of an elastic transformation and a raw transformation.
96 * **Compare two raw deformations** - Calculates the warping index of two raw transformations (same direction).
97 * **Compose two elastic transformations** - Composes two elastic transformations into a raw transformation.
98 * **Compose two raw transformations** - Composes two raw transformations into another raw transformation.
99 * **Compose a raw and an elastic transformation** - Composes a raw transformation and an elastic transformation
100 into a raw transformation.
101 * **Convert elastic transformation to raw** - Converts an elastic (i.e., B-spline ) transformation file into a raw transformation file.
102 * **Apply elastic transformation** - Applies an elastic transformation to an image, producing another image which is elastically
103 deformed according to the transformation.
104 * **Apply raw transformation** - Applies a raw transformation to an image, producing another image which is deformed according
105 to the transformation.
106
107 Other Tools
108 ===========
109 * **Create new image** - Creates a new image of a selected type, size, depth and format.
110 * **Convert image format** - Converts the format of an input image file, producing an output image.
111
112 Licence
113 =======
114
115 Fiji is released as open source under the GNU General Public License: [http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html)
116
117 Fiji builds on top of the ImageJ2 core, which is licensed under the permissive BSD 2-Clause license: [http://opensource.org/licenses/BSD-2-Clause](http://opensource.org/licenses/BSD-2-Clause)
118
119 Plugins and other components have their own licenses.
120