public class Helper extends Object
| Constructor and Description |
|---|
Helper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
augmentHyperstack(ij.ImagePlus image,
int channels)
Augments a hyperstack with empty channel(s).
|
static int |
countBlackPixels(ij.process.ImageProcessor processor)
Counts all black pixels in a given image.
|
static int |
countPixels(ij.process.ImageProcessor processor)
Counts all non-black pixels in a given image.
|
static int |
countPixels(ij.process.ImageProcessor processor,
int threshold)
Counts all pixels above the specified threshold.
|
static int |
countWhitePixels(ij.process.ImageProcessor processor)
Counts all white pixels in a given image.
|
static ij.ImagePlus |
createAugmentedHyperstack(ij.ImagePlus image,
int channels,
boolean destroy)
Creates a copy of a given hyperstack with added (empty) channel(s).
|
static double[] |
extractVolumes(ij.ImagePlus image)
Extracts the volumes occupied by white pixels in a image.
|
static double[] |
extractVolumes(ij.ImagePlus image,
boolean allChannels)
Extracts the volumes occupied by white pixels in a image.
|
static double[] |
extractVolumes(ij.ImagePlus image,
int[] channels)
Extracts the volumes occupied by white pixels in a image.
|
static ij.measure.ResultsTable |
getResultsTable(String title)
Gets or creates a ResultsTable.
|
public static int countBlackPixels(ij.process.ImageProcessor processor)
processor - the image to count black pixels frompublic static int countWhitePixels(ij.process.ImageProcessor processor)
processor - the image to count white pixels frompublic static int countPixels(ij.process.ImageProcessor processor)
processor - the image to count pixels frompublic static int countPixels(ij.process.ImageProcessor processor,
int threshold)
ImageStatistics.getStatistics(ImageProcessor, int, Calibration)
method.processor - the image to count pixels fromthreshold - only pixels above this value will be countedpublic static double[] extractVolumes(ij.ImagePlus image,
int[] channels)
image - the hyperstack to extract volumes fromchannels - a list of channels to extract volumes from. Channel indexes
are 1-based.public static double[] extractVolumes(ij.ImagePlus image,
boolean allChannels)
extractVolumes(ImagePlus, int[]) but takes a single
boolean value instead of a list of channels, indicating whether to process
all channels in the image or only the current one.image - the hyperstack to extract volumes fromallChannels - if true, return volumes for all channels; otherwise return
the volume for the current channel onlypublic static double[] extractVolumes(ij.ImagePlus image)
extractVolumes(ImagePlus, int[]) but extracts the volumes
from all the channels in the source image.image - the hyperstack to extract volumes frompublic static ij.measure.ResultsTable getResultsTable(String title)
title - the title of the results window to look forpublic static ij.ImagePlus createAugmentedHyperstack(ij.ImagePlus image,
int channels,
boolean destroy)
image - The source hyperstack to copy.channels - The number of channels to add.destroy - If true, the source hyperstack is closed once the copy is
over.public static void augmentHyperstack(ij.ImagePlus image,
int channels)
image - the hyperstack to modifychannels - the number of empty channels to addCopyright © 2021. All rights reserved.