bioimaging and optic platform - biop -homepage · bioimaging and optic platform . ... image...
TRANSCRIPT
BIOIMAGING AND OPTIC PLATFORM
Grid Assembly
A plugin developed for microscopy non-overlapping images stitching,
for the public-domain image analysis package ImageJ
User guide
March 2008
Introduction In microscopy one has often to find a compromise between high resolution and a large field of view.
For applications that need both high resolution and large field of view, a possibility to overcome this
limitation is to record the object in multiple tiles and then to stitch them together in the computer.
Grid_Assembly was developed to answer to the exigency of obtaining single mosaics of large
dimension, from the union of sets of non-overlapping tiles acquired in grid-mode.
The resulting mosaic is typically subject to some artefacts, as seam effects and uneven brightness,
which are essentially linked to the acquisition-system side. These effects are principally due to the
uneven illumination of the single tiles during the image acquisition and to some inclination of the
whole sample respect to the objective. These factors can cause brightness variations at a local level
(single tiles) as well as at a global level (complete mosaic). Brightness discontinuities between
contiguous tiles originate the typical seam effects. Therefore, some post-processing of the images
seems to be helpful and necessary in order to obtain agreeable mosaics and in prevision of a following
mosaic deconvolution. In fact the deconvolution exalts the high-frequencies component, thus making
worse the seam artefacts.
Grid_Assembly stitches together the input images, by using the scanning stage-positions information
contained in the images names. It can perform background correction by two different methods, one of
which is theoretically compatible with image quantification operations. It can perform a local seam
correction. If both the background correction and the seam correction are selected, the seam
correction is performed on the mosaic corrected for the background.
Index
Insatallation ....................................................................................................................................... 1
Plugin structure.................................................................................................................................. 1
Input/Output...................................................................................................................................... 2
Input .............................................................................................................................. 2
Output............................................................................................................................ 2
Name convention and scanning path ................................................................................................ 4
Name convention .......................................................................................................... 4
Scanning path................................................................................................................ 4
Post-processing .................................................................................................................................. 5
Background correction – fit parabola........................................................................... 5
Background correction – filtering................................................................................. 7
Seamless correction....................................................................................................... 8
Assembly examples ............................................................................................................................ 10
Deconvolution .................................................................................................................................... 13
Installation Download the jar archive Grid_Assembly_.jar and save it in the plugins folder of ImageJ.
Start ImageJ.
Under the menu Plugins you will find the voice ‘Grid Assembly’.
To start the plugin, click on ‘Grid Assembly’ > ‘Assembly’.
Plugin structure The plugin ‘Grid Assembly’ allows you to stitch together non-overlapping microscopy images acquired
in grid mode. From the single tiles, a single large mosaic is created.
When you launch the plugin, a user-friendly interface appears. The interface is structured in two
menus: the first, ‘Assembly’, allows you to set the input and the output folder, the grid-scanning
modality, the dimensions of the final mosaic, and to define the convention for the images names.
Actually ‘Grid Assembly’ gets the information about the scanning stage position, the z-plane and the
channel from the name of the files in input.
The last panel of the menu ‘Assembly’ allows you to eventually ask for background correction and/or
seam correction. The background correction compensates for the uneven illumination of the samples,
the seam correction reduces the abrupt transitions (seams) between contiguous tiles in the resulting
mosaic. When something different from ‘None’ is selected in the pull-down menus ‘Background corr.’
or ‘Seamless corr.’, the general menu ‘Post-processing settings’ changes colour and becomes accessible.
The menu ‘Post-processing settings’ allows a finer tuning of the parameters for the background
correction and the seam correction.
Press the button ‘Assembly’ to start the processing; press the button ‘Close’ to close the interface.
Note that when you launch the Grid_Assembly plugin, the settings of the previous job are loaded. The
settings are memorized in the file ‘tempAssembly.cfg’, which is automatically generated in your
ImageJ folder the first time that you run the plugin, so please do not delete it.
1
Input/Output Input
The ‘Directories’ panel in the ‘Assembly’ menu allows you to select the
directory with the input images (source) and the directory where the
results will be saved (destination).
The input folder must contain only the images to be processed. All the
images are supposed to have the same name structure and to contain at
least the number of the stage position. If more than one Z-plane and/or
more than one channel are present, it is supposed that the images
names contain also the number of the Z-plane and/or of the channel.
The order numbers that indicate the stage position, the Z-plane and the
channel are supposed to be sequential.
Only two-dimensional images are supported. The application handles
volumetric and multi-channels acquisitions, but the stacks have to be
converted to individual images before running the plugin. All the 2D-
image formats supported by ImageJ are supported.
If more than one channel is present, the different channels are
processed independently.
Remember that the available memory for ImageJ is typically 2/3 of the
physical memory of your computer, so you could get ‘Out-Of-Memory’
exception if you try to stitch heavy datasets. Moreover, if some post-processing is performed, the
memory consumption increases significantly.
To increase the available memory, select ImageJ ‘Edit’ menu > ‘Options > ‘Memory & Threads…’ and
set a new value for ‘Maximum Memory’ (always inferior to the physical memory of your computer),
then restart ImageJ.
2
Output
Assembly outputs one tiff image, 32 bit, for each channel. If more than
one plane exists in the Z dimension, the output is one 32 bit tiff stack
for each channel. The resulting mosaic relative to the first Z-plane, first
channel, is displayed at the end of the processing. All the results are
saved in the destination folder with the name ‘assembly-ch…’.
3
Name convention and scanning path Name convention
It is supposed that the information about the position of the
single tile in the global three-dimensional acquisition grid is
contained in its name.
The panel ‘Name convention’ in the ‘Assembly’ menu allows
you to define the correspondence between the different parts of
the image name and the information about the position of the
tile in the plane (its positional order number), its position in
the third dimension (Z) and its channel.
When the source directory is selected, the name of the first
image in the folder appears in the dedicated fields. On the
name that appears in the second field, you have to select with
the mouse the numbers that correspond to the position, the Z
and the channel and to press the correspondent button to memorize the localization of the information
in the name.
When the ‘Define Position’, ‘Define Z’ or ‘Define Channel’ is pressed, the selected numbers are
highlighted in the corresponding colour in the first field (name in bold letters). The first field allows
you to check your selection.
If only one Z-plane and/or one channel are present, simply do not select anything for the Z and/or the
Channel.
The ‘Clear’ button allows you to clear your selections.
Scanning path
In the ‘Scanning path’ panel you have to define the numbers
of tiles in the X direction (Columns) and in the Y direction
(Rows) of the final mosaic. Moreover, press one of the grid-
like scanning path button (the plugin supports horizontal or
vertical, parallel or anti-parallel, normal or flipped
acquisition scheme).
4
Post-processing settings In the ‘Post-processing settings panel’ you can set the
parameters of the correction algorithms, that is the
background correction and/or the seam correction
algorithms.
Two techniques are implemented for the background
correction, the parabola-fitting and the filtering: you can
choose one of the two. The technique for the seam correction
is unique.
Background correction – fit parabola
This method relies on the hypothesis that the uneven illumination
of the single tiles could be modelled through a paraboloid, which
can usually be accepted only in bright field microscopy. Relying on
this hypothesis, the correction algorithm evaluates on the tile the
parabola that can better fit the non-uniformity of the illumination
and subtracts the so-estimated background to the original tile. If
one can trust on the physical hypothesis concerning the
background (parabolic model), quantification operations can be
performed on the resulting image even if different values have been
subtracted from the different pixels of the image.
It is important to underline that the evaluation of the background
can fail if details of relative big dimension are present in the image,
or if part of the image is constituted by “black background”. In fact
the parabola estimation can be significantly affected by the
presence of big details compared to the dimension of the tile or by
significant black areas, thus giving back a false estimation of the
real background. Examples 1 and 2 show an unreliable and a good
estimation of the background from a tile.
In the ‘Background correction: Fit parabola’ panel of the ‘Post-processing’ menu you can choose
between different ways to evaluate the background. The evaluation of the parabola can be performed
5
tile-by-tile (option ‘Local’, which is the default option) or on an image selected by the user (option
‘From selected image’), typically a blank image acquired on purpose for the background estimation. In
this last case you have to select the specific image for the background evaluation too. Selecting the
option ‘Auto’, the correction algorithm looks automatically for the best estimation of the background
between the parabola evaluations on all the single tiles of the mosaic (first Z-plane and first channel).
If the ‘Auto’ or the ‘From selected image’ option is selected, the same background will be subtracted to
all the tiles of the mosaic: this operation relies on the hypothesis that the uneven illumination of the
investigated area is exactly the same for all the tiles. In case of subtraction of the same background
from all the tiles, it has to be considered that the subtraction will probably create some artefacts in
eventual uniform black areas which are not affected by uneven illumination artefact. For example, in
the following image the subtraction of the estimated background creates an artificial light area in the
right upper corner of the image.
Concerning the automatic evaluation of the best background, if there are many images in the mosaic
with large details or large black areas, which are elements that badly affect the real background
estimation given by the uneven illumination, the estimation of the best background will be deviated.
The parabola subtraction is performed tile-by-tile and does not correct for any global trend of
brightness variation across the whole mosaic, bust just for the local uneven illumination (single tile).
Example 1: the black area does not allow a correct evaluation of the uneven illumination of the sample.
Example 2: reliable estimation of the background
6
Background correction – filtering
This method relies on the hypothesis that the single tiles
backgrounds and the brightness changes in the global mosaic are
smooth and slowly-varying. The correction algorithm removes
from the assembled mosaic a band of low frequencies whose
position and extension depend on the tiles size and can be tuned by
the user. However, no specific frequencies values are asked,
because the filtering is performed in the spatial domain through an
opportune combination of Gaussian filtering and simple images
arithmetic operations. The parameters of the Gaussian filtering
(the kernel opening σ) are linked to the dimension of the tiles and
some default parameters are given (to set the default values, press
the ‘Set Default’ button).
You can act on the strength of the correction, that is to say on the
position and on the extension of the removed frequencies band,
setting the two parameters ‘Correction strength [%]’ and ‘Lower
frequencies Ratio’. The parameter ‘Correction strength [%]’ has to
be set as a percentage of the tile dimension and is linked to the
position of the removed frequencies band. The default value is 88%
of the tile size and it can be thought as the spatial semi-period of variation of the background function.
This parameter can be increased if a stronger correction is needed, but the more it is increased, the
more real low-frequency components of the image may be lost. The second parameter, the ‘Lower
frequencies Ratio’, must be bigger than 1 and is linked to the extension of the removed frequency band.
Its default value is 2. This parameter is linked to the distance between the two bounds of the
subtracted frequency band and you can set a higher value if you want to remove a larger band of
frequencies.
The frequency correction algorithm corrects for the local and the global uneven brightness. It should
not be used if some quantification has to be done on the image.
The example 3 shows a non-corrected mosaic, the low frequencies image that is subtracted from the
original one and the mosaic corrected for the background through the filtering technique.
7
Example 3: background correction, filtering technique
Seamless correction
The seam artefact, that is the presence of abrupt and evident transitions between contiguous tiles, is
due to the non-homogeneity of the illumination on the single tiles as well as on the global mosaic area.
Consequently, this artefact is partially attenuated after the background correction. The seam
correction algorithm performs a further smoothing of the transitions between the tiles. In the
assembled mosaic, the seams are high frequency components: the principle of the seam correction
algorithm is thus to filter these frequency components, without affecting the real high-frequency
content of the image. The correction is performed in the spatial domain, through an opportune
combination of Gaussian filtering and simple images arithmetic operations, so that no exact frequency
8
values have to be set. The parameter for the Gaussian filtering is
linked to the tile dimension and a default value is given (‘Correction
strength [%]’ = 3). The parameter ‘Correction strength [%]’ is set as
percentage of the tile dimension and it is linked to the period of the
spatial variations in the mosaic that will be corrected. It can be
increased, but too high values of this parameter could imply a loss of
definition of the high frequency details of the mosaic, close to the
seams.
If the ‘Correction strength [%]’ is kept low, the seam correction
algorithm does not affect the centres of the tiles, but just their
borders, so it can be applied also if one want to perform
quantification operations on the mosaic.
Example 4 shows the result of the seam correction in a detail of a
mosaic.
Example 4: seam correction
9
Assembly examples Some examples are presented to help you in the choice of the better correction setting.
Example A – local parabola background correction
Original mosaic and corrected mosaic through background correction (parabola fitting, local parabola
estimation) and seam correction. The correction for the background by subtraction of the locally
estimated parabola fails in the parts where large black areas are present. The seam correction properly
smooths the transitions between contiguous tiles.
10
Example B – seam correction
Example C – background correction techniques
Non- corrected mosaic.
11
12
Background correction by best parabola subtraction (automatically estimated) and seam correction
(default parameters) have been applied to the original mosaic.
Frequency background correction and seam correction (default parameters) have been applied to the
original mosaic.
Deconvolution Concerning the deconvolution, we suggest to stitch the tiles together before, the to perform the
deconvolution. An example is reported:
Deconvolution of the single tiles (Huygens, CLME algorithm, in/near object background estimation
method), then assemblage of the mosaic.
Deconvolution of the assembled mosaic (Huygens, CLME algorithm, in/near object background
estimation method).
13
Deconvolution of the single tiles (Huygens, CLME algorithm, in/near object background estimation
method), then assemblage of the mosaic: detail.
Deconvolution of the assembled mosaic (Huygens, CLME algorithm, in/near object background
estimation method): detail.
14