public class LabelImgExporter extends AbstractTMAction
| Modifier and Type | Class and Description |
|---|---|
static class |
LabelImgExporter.Factory |
static class |
LabelImgExporter.LabelIdPainting
Specifies how spots will be labeled in the exported label image.
|
static class |
LabelImgExporter.SpotAsDotWriter<T extends RealType<T>> |
static class |
LabelImgExporter.SpotRoiWriter<T extends RealType<T>> |
static interface |
LabelImgExporter.SpotWriter
Interface for classes that can 'write' a spot into a label image.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
INFO_TEXT |
static String |
KEY |
static String |
NAME |
logger| Constructor and Description |
|---|
LabelImgExporter() |
| Modifier and Type | Method and Description |
|---|---|
static ij.ImagePlus |
createLabelImagePlus(Model model,
ij.ImagePlus imp,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static ij.ImagePlus |
createLabelImagePlus(Model model,
ij.ImagePlus imp,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting,
Logger logger)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static ij.ImagePlus |
createLabelImagePlus(Model model,
int[] dimensions,
double[] calibration,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static ij.ImagePlus |
createLabelImagePlus(Model model,
int[] dimensions,
double[] calibration,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting,
Logger logger)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static ij.ImagePlus |
createLabelImagePlus(TrackMate trackmate,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labeIdPainting)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static ij.ImagePlus |
createLabelImagePlus(TrackMate trackmate,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting,
Logger logger)
Creates a new label
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value. |
static Img<FloatType> |
createLabelImg(Model model,
long[] dimensions,
double[] calibration,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting)
|
static Img<FloatType> |
createLabelImg(Model model,
long[] dimensions,
double[] calibration,
boolean exportSpotsAsDots,
boolean exportTracksOnly,
LabelImgExporter.LabelIdPainting labelIdPainting,
Logger logger)
|
static <T extends RealType<T> & NativeType<T>> |
createLabelImg(SpotCollection spots,
long[] dimensions,
double[] calibration,
boolean exportSpotsAsDots,
LabelImgExporter.LabelIdPainting labelIdPainting,
T outputType,
Logger logger)
|
void |
execute(TrackMate trackmate,
SelectionModel selectionModel,
DisplaySettings displaySettings,
Frame gui)
Executes this action within an application specified by the parameters.
|
setLoggerpublic static final String INFO_TEXT
public static final String KEY
public static final String NAME
public void execute(TrackMate trackmate, SelectionModel selectionModel, DisplaySettings displaySettings, Frame gui)
TrackMateActiontrackmate - the TrackMate instance to use to execute the action.selectionModel - the SelectionModel currently used in the application,displaySettings - the DisplaySettings used to render the views in the
application.gui - the user-interface parent window.public static final ij.ImagePlus createLabelImagePlus(TrackMate trackmate, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labeIdPainting)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.trackmate - the trackmate instance from which we takes the spots to paint.
The label image will have the same calibration, name and
dimension from the input image stored in the trackmate
settings. The output label image will have the same size that
of this input image, except for the number of channels, which
will be 1.exportSpotsAsDots - if true, spots will be painted as single dots. If
false they will be painted with their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labeIdPainting - specifies how to paint the label ID of spots.ImagePlus.public static final ij.ImagePlus createLabelImagePlus(TrackMate trackmate, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting, Logger logger)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.trackmate - the trackmate instance from which we takes the spots to paint.
The label image will have the same calibration, name and
dimension from the input image stored in the trackmate
settings. The output label image will have the same size that
of this input image, except for the number of channels, which
will be 1.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.logger - a Logger instance, to report progress of the export
process.ImagePlus.public static final ij.ImagePlus createLabelImagePlus(Model model, ij.ImagePlus imp, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.model - the model from which we takes the spots to paint.imp - a source image to read calibration, name and dimension from.
The output label image will have the same size that of this
source image, except for the number of channels, which will be
1.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.ImagePlus.public static final ij.ImagePlus createLabelImagePlus(Model model, ij.ImagePlus imp, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting, Logger logger)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.model - the model from which we takes the spots to paint.imp - a source image to read calibration, name and dimension from.
The output label image will have the same size that of this
source image, except for the number of channels, which will be
1.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.logger - a Logger instance, to report progress of the export
process.ImagePlus.public static final ij.ImagePlus createLabelImagePlus(Model model, int[] dimensions, double[] calibration, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.model - the model from which we takes the spots to paint.dimensions - the desired dimensions of the output image (width, height,
nZSlices, nFrames) as a 4 element long array. Spots outside
these dimensions are ignored.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.ImagePlus.public static final ij.ImagePlus createLabelImagePlus(Model model, int[] dimensions, double[] calibration, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting, Logger logger)
ImagePlus where the spots of the specified
model are painted with their shape, with their track ID as pixel value.model - the model from which we takes the spots to paint.dimensions - the desired dimensions of the output image (width, height,
nZSlices, nFrames) as a 4 element int array. Spots outside
these dimensions are ignored.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.logger - a Logger instance, to report progress of the export
process.ImagePlus.public static final Img<FloatType> createLabelImg(Model model, long[] dimensions, double[] calibration, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting)
Img of FloatType where the spots of
the specified model are painted with their shape, with their track ID as
pixel value.model - the model from which we takes the spots to paint.dimensions - the desired dimensions of the output image (width, height,
nZSlices, nFrames) as a 4 element long array. Spots outside
these dimensions are ignored.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.Img.public static final Img<FloatType> createLabelImg(Model model, long[] dimensions, double[] calibration, boolean exportSpotsAsDots, boolean exportTracksOnly, LabelImgExporter.LabelIdPainting labelIdPainting, Logger logger)
Img of FloatType where the spots of
the specified model are painted with their shape, with an ID pixel value.model - the model from which we takes the spots to paint.dimensions - the desired dimensions of the output image (width, height,
nZSlices, nFrames) as a 4 element long array. Spots outside
these dimensions are ignored.exportSpotsAsDots - if true, spots will be painted as single dots
instead their shape.exportTracksOnly - if true, only the spots belonging to visible
tracks will be painted. If false, spots not
belonging to a track will be painted with a unique ID,
different from the track IDs and different for each spot.labelIdPainting - specifies how to paint the label ID of spots.logger - a Logger instance, to report progress of the export
process.Img.public static <T extends RealType<T> & NativeType<T>> ImgPlus<T> createLabelImg(SpotCollection spots, long[] dimensions, double[] calibration, boolean exportSpotsAsDots, LabelImgExporter.LabelIdPainting labelIdPainting, T outputType, Logger logger)
ImgPlus of FloatType where the spots
are painted with an ID. All visible spots are painted, whether they are
in a track or not.spots - the spots to paint.dimensions - the desired dimensions of the output image (width, height,
nZSlices, nFrames) as a 4 element long array. Spots outside
these dimensions are ignored.exportSpotsAsDots - if true, spots will be painted as single dots
instead of their shape.labelIdPainting - specifies how to paint the label ID of spots. The
LabelImgExporter.LabelIdPainting.LABEL_IS_TRACK_ID is not supported and
defaults to LabelImgExporter.LabelIdPainting.LABEL_IS_SPOT_ID.logger - a Logger instance, to report progress of the export
process.ImgPlus.Copyright © 2010–2024 TrackMate. All rights reserved.