Add a helper method to augment a hyperstack by adding empty channels
at the end. Contrary to the createAugmentedHyperstack method, this
new method does not create a new image but modify the source image "in
place".
When copying the image processors from the original hyperstack to
the duplicated, augmented hyperstack, do not update the display on
every position change.
Make sure we accept the "RenyiEntropy" spelling (without underscore),
for consistency with what we already do for the Max_Entropy or
Min_Error algorithms.
Forcibly setting the Stitch Option to the LOCI importer seems to
prevent opening all series, maybe because the importer then assumes
that the images of the series are actually tiles.
This fixes the long-standing issue that the UnifiedMerge plugin would
only work properly if the hyperstack has been manually set to
grayscale mode prior to running the plugin.
When the ChannelMasker calls the apply method, it passes an
ImageProcessor source which has already been duplicated, so there's
no need to duplicate that object again prior to applying the mask.
Remove deprecated methods in the BatchReader class. Also remove
now-deprecated masking methods in the Helper class (those methods
were not previously marked as deprecated, but it's fine since there
will already be some breaking changes in the next release anyway).
Breaking change in the extractVolumes helper method: the
method now assumes the volumes to extract are represented
by the white pixels instead of the black pixels. This is for
consistency with the new default behavior of the ChannelMasker
class, which creates masks with the pixels above the threshold
in white.
Update the ChannelMasker class to use the new masking methods
available in Masking.
In addition this commit introduces deliberately breaking changes
in the public interface (notably, the excludeBlack parameter is
replaced by a flag int and the syntax of the createMasker command
has slightly changed).
Add a MASKLOC command to the ChannelMasker interface to
allow using local thresholding algorithms.
This is work in progress. It works but will need to be refined
as the code behind ChannelMasker is becoming ugly, as well as
its interface.
Actually I am starting to envision a complete overhaul of the
ChannelMasker interface.
References #5
Add a createMaskFromLocalThreshold method in the Helper class to wrap
a call to Fiji's Auto Local Threshold plugin.
This is a first step in implementing support for local thresholding
algorithms in the ChannelMasker object (#6).
When segmenting, return directly the result of the Watershed step;
do not invert the binary image. This will create a segmented image
with a black background and white nuclei.
Use the ImageStatistics class to have ImageJ count non-black
pixels, then infer from that the number of black pixels. Thus
we don't have to iter through the pixels ourselves.
Do not translate channel codes to channel indexes when creating a
ChannelMasker object, but only when applying the masker to a given
image. This allows to create a single masker object and use it on
images with different channel orders.
Overload all methods that manipulate masks to accept an extra
parameter (excludeBlack) indicating whether to invert how binary masks
are to be interpreted. If that parameter is true, black pixels in masks
represent pixels to exclude, not include, when applying the mask to an
image.