public class ExportBestFlatImage extends Object
Modifier and Type | Field and Description |
---|---|
int |
backgroundValue |
Rectangle |
finalBox |
double |
largest_possibly_needed_area |
protected Loader |
loader |
double |
max_possible_area |
List<Patch> |
patches |
double |
scale |
double |
scaleUP |
Constructor and Description |
---|
ExportBestFlatImage(List<Patch> patches,
Rectangle finalBox,
int backgroundValue,
double scale)
Class to manage the creation of an ImageProcessor containing a flat 8-bit or RGB image for use in e.g.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUseAWTImage() |
double |
computeSigma(int width,
int height) |
protected ij.process.FloatProcessor |
convertToFloat(ij.process.ShortProcessor sp) |
protected Image |
createAWTImage(int type)
Create a java.awt.Image using the Loader.getFlatAWTImage method, using 'true' for the quality flag,
which means than an image 2x larger on each side will be generated and then scaled down by area averaging.
|
protected Image |
createAWTImage(int type,
Color background)
Create a java.awt.Image using the Loader.getFlatAWTImage method, using 'true' for the quality flag,
which means than an image 2x larger on each side will be generated and then scaled down by area averaging.
|
protected ij.process.FloatProcessor |
gaussianDownsampled(ij.process.FloatProcessor ip)
Gaussian-downsample to the target dimensions
|
boolean |
isSmallerThan2GB() |
Pair<ij.process.ColorProcessor,ij.process.ByteProcessor> |
makeFlatColorImage() |
Pair<ij.process.FloatProcessor,ij.process.FloatProcessor> |
makeFlatFloatGrayImageAndAlpha()
While the data is in the 8-bit range, the format is as a FloatProcessor.
|
ij.process.ByteProcessor |
makeFlatGrayImage() |
Pair<ij.process.ByteProcessor,ij.process.ByteProcessor> |
makeFlatGrayImageAndAlpha() |
void |
printInfo() |
public final Rectangle finalBox
public final int backgroundValue
public final double scale
public final double largest_possibly_needed_area
public final double max_possible_area
public final double scaleUP
protected final Loader loader
public ExportBestFlatImage(List<Patch> patches, Rectangle finalBox, int backgroundValue, double scale)
patches
- finalBox
- backgroundValue
- scale
- public boolean canUseAWTImage()
public boolean isSmallerThan2GB()
public void printInfo()
protected ij.process.FloatProcessor convertToFloat(ij.process.ShortProcessor sp)
public double computeSigma(int width, int height)
protected ij.process.FloatProcessor gaussianDownsampled(ij.process.FloatProcessor ip)
ip
- protected Image createAWTImage(int type, Color background)
type
- Either ImagePlus.GRAY8 (TYPE_BYTE_INDEXED) or ImagePlus.COLOR_RGB (TYPE_INT_ARGB)background
- protected Image createAWTImage(int type)
type
- Either ImagePlus.GRAY8 (TYPE_BYTE_INDEXED) or ImagePlus.COLOR_RGB (TYPE_INT_ARGB)public Pair<ij.process.ColorProcessor,ij.process.ByteProcessor> makeFlatColorImage()
public ij.process.ByteProcessor makeFlatGrayImage()
public Pair<ij.process.ByteProcessor,ij.process.ByteProcessor> makeFlatGrayImageAndAlpha()
public Pair<ij.process.FloatProcessor,ij.process.FloatProcessor> makeFlatFloatGrayImageAndAlpha()
Copyright © 2015–2021 Fiji. All rights reserved.