public abstract class ImageHandler
extends java.lang.Object
This file is part of tango
tango is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see
Modifier and Type | Field and Description |
---|---|
static double |
defZoomFactor |
protected ImagePlus |
img |
int |
offsetX |
int |
offsetY |
int |
offsetZ |
int |
sizeX |
int |
sizeXY |
long |
sizeXYZ |
int |
sizeY |
int |
sizeZ |
protected java.lang.String |
title |
Modifier | Constructor and Description |
---|---|
protected |
ImageHandler(ImagePlus img) |
protected |
ImageHandler(ImageStack stack) |
protected |
ImageHandler(java.lang.String title,
int sizeX,
int sizeY,
int sizeZ) |
protected |
ImageHandler(java.lang.String title,
int sizeX,
int sizeY,
int sizeZ,
int offsetX,
int offsetY,
int offsetZ) |
Modifier and Type | Method and Description |
---|---|
ImageHandler |
addImage(ImageHandler image,
float s1,
float s2)
Compute the operation s1*this + s2*other
|
ImageHandler |
addImage(ImageHandler image,
int s1,
int s2) |
void |
addValue(float val) |
void |
closeImagePlus() |
boolean |
contains(double x,
double y,
double z) |
boolean |
contains(int x,
int y,
int z) |
boolean |
contains(Point3DInt V) |
boolean |
contains(Voxel3D V) |
static void |
convertToByte(ImageHandler image) |
static void |
convertToByte(ImageHandler[] images) |
java.util.List<Voxel3D> |
createListVoxels(int thresh) |
ImageHandler |
createSameDimensions() |
ImageHandler |
createSameType(int sx,
int sy,
int sz) |
abstract ImageHandler |
crop3D(java.lang.String title,
int x_min,
int x_max,
int y_min,
int y_max,
int z_min,
int z_max)
see ImageCropper
|
abstract ImageHandler[] |
crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds) |
abstract ImageHandler |
crop3DMask(java.lang.String title,
ImageInt mask,
float label,
int x_min_,
int x_max_,
int y_min_,
int y_max_,
int z_min_,
int z_max_) |
abstract ImageHandler |
cropRadius(int x0,
int y0,
int z0,
int rx,
int ry,
int rz,
boolean mean,
boolean sphere)
Extract a 3D image from a specified location as the center of crop
|
abstract ImageHandler |
deleteSlices(int zmin,
int zmax) |
void |
divideByValue(float coeff) |
ImageHandler |
divideImage(ImageHandler image,
float coeff)
Compute the operation this/(other*coeff);
|
abstract void |
draw(Object3D o,
float value) |
ImageHandler |
duplicate() |
ImageHandler |
enlarge(int dx,
int dy,
int dz) |
abstract void |
erase() |
double[] |
extractLine(int x0,
int y0,
int z0,
int x1,
int y1,
int z1,
boolean interpolate) |
void |
fill(double value) |
abstract void |
fill(double value,
int min,
int max) |
void |
flush() |
protected abstract void |
flushPixels() |
abstract java.lang.Object |
getArray1D() |
abstract java.lang.Object |
getArray1D(int z) |
byte[] |
getBinaryData() |
java.util.TreeMap<java.lang.Float,int[]> |
getBounds(boolean addBorder) |
Calibration |
getCalibration()
Deprecated.
|
ImageFloat |
getDistanceMap(float thld,
float scaleXY,
float scaleZ,
boolean invert,
int nbCPUs) |
protected abstract int[] |
getHisto(ImageInt mask) |
protected abstract int[] |
getHisto(ImageInt mask,
int nBins,
double min,
double max) |
int[] |
getHistogram() |
int[] |
getHistogram(java.util.ArrayList<? extends Point3D> mask,
int nBins,
double min,
double max)
Deprecated.
|
int[] |
getHistogram(ImageInt mask) |
int[] |
getHistogram(ImageInt mask,
int nBins,
double min,
double max) |
int[] |
getHistogram(java.util.LinkedList<? extends Point3D> mask,
int nBins,
double min,
double max) |
static ImagePlus |
getHyperStack(java.lang.String title,
ImageHandler[] images) |
ImagePlus |
getImagePlus() |
ImageStack |
getImageStack() |
ImageStats |
getImageStats(ImageInt mask) |
double[] |
getLineX(int x0,
int y0,
int z0,
int length) |
double[] |
getLineY(int x0,
int y0,
int z0,
int length) |
double[] |
getLineZ(int x0,
int y0,
int z0,
int length) |
double |
getMax()
Get the maximum value in the image
|
double |
getMax(ImageInt mask) |
float |
getMaxBelowValue(float value) |
Voxel3D |
getMaxPosition()
Return the position of the voxel having maximum value in the image
|
double |
getMean() |
double |
getMean(ImageInt mask) |
double |
getMin() |
double |
getMin(ImageInt mask) |
float |
getMinAboveValue(float value)
Gets the minAboveValue attribute of the FishImage3D object
|
protected abstract void |
getMinAndMax(ImageInt mask) |
double[] |
getMinAndMaxArray(java.util.ArrayList<? extends Point3D> mask)
Deprecated.
|
double[] |
getMinAndMaxArray(java.util.LinkedList<? extends Point3D> mask) |
protected void |
getMoments(ImageInt mask) |
ArrayUtil |
getNeighborhood(int x,
int y,
int z,
float radx,
float rady,
float radz)
Gets the neighboring of a pixel (default=sphere)
|
ArrayUtil |
getNeighborhood3x3x3(int x,
int y,
int z)
Gets the 3D neighborhood of the pixel in 8 connexion --> 27 pixels
|
java.util.LinkedList<Voxel3D> |
getNeighborhood3x3x3CenterList(int x,
int y,
int z) |
java.util.ArrayList<Voxel3D> |
getNeighborhood3x3x3ListCenter(int x,
int y,
int z)
Deprecated.
|
java.util.ArrayList<Voxel3D> |
getNeighborhood3x3x3ListNoCenter(int x,
int y,
int z)
Deprecated.
|
java.util.LinkedList<Voxel3D> |
getNeighborhood3x3x3NoCenterList(int x,
int y,
int z)
Deprecated.
|
java.util.LinkedList<VoxelInt> |
getNeighborhood3x3x3NoCenterListInt(int x,
int y,
int z) |
ArrayUtil |
getNeighborhoodBrick(int x,
int y,
int z,
int stepx,
int stepy,
int stepz) |
ArrayUtil |
getNeighborhoodCross3D(int x,
int y,
int z)
6-neighborhood in 3D cross of a given voxel
|
java.util.ArrayList<Voxel3D> |
getNeighborhoodCross3DList(int x,
int y,
int z,
boolean excludeCenter)
Deprecated.
|
ArrayUtil |
getNeighborhoodKernel(int[] ker,
int nbval,
int x,
int y,
int z,
float radx,
float rady,
float radz)
Gets the neighboring attribute of the Image3D with a kernel as a array
|
ArrayUtil |
getNeighborhoodKernel(Object3D obj,
int x,
int y,
int z) |
ArrayUtil |
getNeighborhoodKernelAdd(Object3D obj,
ImageHandler img,
int x,
int y,
int z) |
ArrayUtil |
getNeighborhoodKernelSubstract(Object3D obj,
ImageHandler img,
int x,
int y,
int z) |
ArrayUtil |
getNeighborhoodLayer(int x,
int y,
int z,
float r0,
float r1)
Get the neighborhood as a layer of pixels
|
ArrayUtil |
getNeighborhoodLayer(int x,
int y,
int z,
float r0,
float r1,
ImageHandler water)
Get the neighborhood as a layer of pixels
|
ArrayUtil |
getNeighborhoodLayerAngle(int x,
int y,
int z,
float r0,
float r1,
double angRef,
Vector3D ref)
Get the neighborhood as a layer of pixels
|
java.util.ArrayList<Voxel3D> |
getNeighborhoodLayerList(int x,
int y,
int z,
float r0,
float r1)
Deprecated.
|
java.util.ArrayList<Voxel3D> |
getNeighborhoodLayerList(int x,
int y,
int z,
float r0,
float r1,
ImageInt water)
Deprecated.
|
ArrayUtil |
getNeighborhoodSphere(int x,
int y,
int z,
float radx,
float rady,
float radz)
Gets the neighboring of a pixel (sphere)
|
ArrayUtil |
getNeighborhoodXY3x3(int x,
int y,
int z) |
double |
getPercentile(double percent,
ImageInt mask) |
float |
getPixel(float x,
float y,
float z) |
float |
getPixel(float x,
float y,
float z,
ImageInt mask) |
abstract float |
getPixel(int coord)
Deprecated.
|
abstract float |
getPixel(int xy,
int z) |
abstract float |
getPixel(int x,
int y,
int z) |
abstract float |
getPixel(Point3D P) |
abstract float |
getPixel(Point3DInt P) |
abstract float |
getPixelInterpolated(Point3D P) |
double |
getScaleXY() |
double |
getScaleZ() |
abstract double |
getSizeInMb() |
byte[] |
getThumbNail(int sizeX,
int sizeY) |
byte[] |
getThumbNail(int sizeX,
int sizeY,
ImageInt mask) |
ImagePlus |
getThumbnailImage(int sizeX,
int sizeY,
int minZ,
int maxZ,
ImageInt mask)
Deprecated.
|
java.lang.String |
getTitle() |
abstract int |
getType() |
java.lang.String |
getUnit() |
boolean |
hasOneValue(float f) |
void |
hide() |
static void |
homogenizeBitDepth(ImageHandler[] images) |
void |
insert(ImageHandler vol,
int x0,
int y0,
int z0,
boolean average)
Insert a 3D image to a specified location
|
void |
insertMask(ImageHandler vol,
int x0,
int y0,
int z0) |
abstract void |
intersectMask(ImageHandler mask) |
abstract void |
intersectMask(ImageInt mask)
Deprecated.
|
abstract void |
intersectMask2D(ImageInt mask,
int z) |
void |
invert() |
abstract void |
invert(ImageInt mask) |
void |
invertBackground(float bckg,
float value) |
boolean |
isBinary() |
boolean |
isBinary(int background) |
abstract boolean |
isOpened() |
boolean |
isVisible() |
boolean |
maskContains(int x,
int y,
int z) |
static ImageShort |
merge3D(ImageInt[] images,
int sizeX,
int sizeY,
int sizeZ) |
static ImageShort |
merge3DBinary(ImageInt[] images,
int sizeX,
int sizeY,
int sizeZ) |
static ImageHandler |
merge3DRaw(ImageHandler[] images,
int sizeX,
int sizeY,
int sizeZ) |
void |
multiplyByValue(float coeff) |
ImageHandler |
multiplyImage(ImageHandler image,
float coeff)
Compute the operation coeff*this*other;
|
static ImageHandler |
newBlankImageHandler(java.lang.String title,
ImageHandler ih) |
ImageHandler |
normaliseValue(float meanV,
float sdV) |
protected abstract ImageFloat |
normalize_(ImageInt mask,
double saturation) |
abstract ImageFloat |
normalize(double min,
double max) |
ImageFloat |
normalize(ImageInt mask,
double saturation) |
static ImageHandler |
openImage(java.io.File f) |
ImageHandler |
powImage(double pow) |
double[] |
radialDistribution(int x0,
int y0,
int z0,
int maxR)
Radial distribution of pixels mean values in layers
|
double[] |
radialDistribution(int x0,
int y0,
int z0,
int maxR,
ImageInt water) |
double[] |
radialDistribution(int x0,
int y0,
int z0,
int maxR,
int measure,
ImageHandler water)
Radial distribution of pixels mean values in layers
|
void |
replacePixelsValue(int val,
int rep)
Replace a pixel value by another
|
void |
replacePixelsValue(int val1,
int rep1,
int val2,
int rep2) |
void |
replacePixelsValueFloat(float val,
float rep) |
abstract ImageHandler |
resample(int newZ,
int method)
Rescale the image to new dimension, only in Z
|
abstract ImageHandler |
resample(int newX,
int newY,
int newZ,
int method)
Rescale the image to new dimension, in X Y and Z
|
void |
resetStats() |
void |
resetStats(ImageInt mask) |
abstract ImageHandler |
resize(int dX,
int dY,
int dZ)
Enlarge the canvas size of the image in X, Y and Z .
|
boolean |
sameDimensions(ImageHandler other) |
boolean |
sameDimensions(ImagePlus other) |
boolean |
sameDimentions(ImageHandler other)
Deprecated.
|
boolean |
sameDimentions(ImagePlus other)
Deprecated.
|
void |
save(java.lang.String directory) |
void |
save(java.lang.String directory,
boolean addsuffix) |
void |
saveThumbNail(int sizeX,
int sizeY,
java.lang.String directory) |
void |
set332RGBLut() |
void |
setCalibration(Calibration cal)
Deprecated.
|
void |
setGraysLut() |
void |
setLineX(int x0,
int y0,
int z0,
double[] line) |
void |
setLineY(int x0,
int y0,
int z0,
double[] line) |
void |
setLineZ(int x0,
int y0,
int z0,
double[] line) |
void |
setMinAndMax(float min,
float max) |
void |
setMinAndMax(ImageInt mask) |
void |
setOffset(ImageHandler other) |
void |
setOffset(int ox,
int oy,
int oz) |
abstract void |
setPixel(int coord,
float value)
Deprecated.
|
abstract void |
setPixel(int xy,
int z,
float value) |
abstract void |
setPixel(int x,
int y,
int z,
float value) |
abstract void |
setPixel(Point3D point,
float value) |
abstract void |
setPixel(Point3DInt point,
float value) |
void |
setPixelIncrement(int x,
int y,
int z,
float inc) |
void |
setPixelIncrement(Point3D P,
float inc) |
void |
setScale(double scaleXY,
double scaleZ,
java.lang.String unit) |
void |
setScale(ImageHandler other) |
void |
setTitle(java.lang.String title) |
void |
show() |
void |
show(java.lang.String title) |
void |
showDuplicate(java.lang.String title) |
ImageFloat |
substractImage(ImageHandler other)
Deprecated.
|
ImageFloat |
subtractImage(ImageHandler other) |
abstract ImageByte |
threshold(float thld,
boolean keepUnderThld,
boolean strict) |
ImageByte |
thresholdAboveExclusive(float thld) |
ImageByte |
thresholdAboveInclusive(float thld) |
abstract void |
thresholdCut(float thld,
boolean keepUnderThld,
boolean strict) |
abstract ImageByte |
thresholdRangeExclusive(float min,
float max) |
abstract ImageByte |
thresholdRangeInclusive(float min,
float max) |
static ImageByte |
ToByte(ImageHandler image) |
boolean |
touchBorders(int x,
int y,
int z) |
void |
transfertPixelValues(ImageHandler other,
float val,
float rep) |
abstract void |
trimSlices(int zmin,
int zmax) |
void |
updateDisplay() |
static ImageHandler |
wrap(ImagePlus imp) |
static ImageHandler |
wrap(ImageStack stack) |
static void |
zoom(ImagePlus image,
double magnitude) |
public static double defZoomFactor
public int sizeX
public int sizeY
public int sizeZ
public int sizeXY
public int offsetX
public int offsetY
public int offsetZ
public long sizeXYZ
protected ImagePlus img
protected java.lang.String title
protected ImageHandler(ImagePlus img)
protected ImageHandler(ImageStack stack)
protected ImageHandler(java.lang.String title, int sizeX, int sizeY, int sizeZ)
protected ImageHandler(java.lang.String title, int sizeX, int sizeY, int sizeZ, int offsetX, int offsetY, int offsetZ)
public static ImageHandler wrap(ImagePlus imp)
public static ImageHandler wrap(ImageStack stack)
public static ImageHandler openImage(java.io.File f)
public static ImageHandler newBlankImageHandler(java.lang.String title, ImageHandler ih)
public static void zoom(ImagePlus image, double magnitude)
public static ImageShort merge3DBinary(ImageInt[] images, int sizeX, int sizeY, int sizeZ)
public static ImageShort merge3D(ImageInt[] images, int sizeX, int sizeY, int sizeZ)
public static ImageHandler merge3DRaw(ImageHandler[] images, int sizeX, int sizeY, int sizeZ)
public static ImagePlus getHyperStack(java.lang.String title, ImageHandler[] images)
public static void homogenizeBitDepth(ImageHandler[] images)
public static void convertToByte(ImageHandler[] images)
public static void convertToByte(ImageHandler image)
public static ImageByte ToByte(ImageHandler image)
public abstract double getSizeInMb()
public ImagePlus getImagePlus()
public abstract int getType()
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
@Deprecated public boolean sameDimentions(ImageHandler other)
public boolean sameDimensions(ImageHandler other)
@Deprecated public boolean sameDimentions(ImagePlus other)
public boolean sameDimensions(ImagePlus other)
public boolean contains(int x, int y, int z)
public boolean contains(double x, double y, double z)
public boolean contains(Voxel3D V)
public boolean contains(Point3DInt V)
public boolean maskContains(int x, int y, int z)
@Deprecated public abstract float getPixel(int coord)
public abstract float getPixel(int x, int y, int z)
public abstract float getPixel(int xy, int z)
public abstract float getPixel(Point3D P)
public abstract float getPixel(Point3DInt P)
public abstract float getPixelInterpolated(Point3D P)
public float getPixel(float x, float y, float z)
public float getPixel(float x, float y, float z, ImageInt mask)
public ArrayUtil getNeighborhood3x3x3(int x, int y, int z)
x
- x coordinatey
- y coordinatez
- z coordinatepublic ArrayUtil getNeighborhoodXY3x3(int x, int y, int z)
@Deprecated public java.util.ArrayList<Voxel3D> getNeighborhood3x3x3ListCenter(int x, int y, int z)
public java.util.LinkedList<Voxel3D> getNeighborhood3x3x3CenterList(int x, int y, int z)
@Deprecated public java.util.ArrayList<Voxel3D> getNeighborhood3x3x3ListNoCenter(int x, int y, int z)
@Deprecated public java.util.LinkedList<Voxel3D> getNeighborhood3x3x3NoCenterList(int x, int y, int z)
public java.util.LinkedList<VoxelInt> getNeighborhood3x3x3NoCenterListInt(int x, int y, int z)
public ArrayUtil getNeighborhoodCross3D(int x, int y, int z)
x
- x-coordinate of the voxely
- y-coordinate of the voxelz
- z-coordinate of the voxel@Deprecated public java.util.ArrayList<Voxel3D> getNeighborhoodCross3DList(int x, int y, int z, boolean excludeCenter)
x
- x-coordinate of the voxely
- y-coordinate of the voxelz
- z-coordinate of the voxelexcludeCenter
- exclude centre pixel from listpublic ArrayUtil getNeighborhood(int x, int y, int z, float radx, float rady, float radz)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelradx
- Radius x of the neighboringrady
- Radius y of the neighboringradz
- Radius z of the neighboringpublic ArrayUtil getNeighborhoodSphere(int x, int y, int z, float radx, float rady, float radz)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelradx
- Radius x of the neighboringrady
- Radius y of the neighboringradz
- Radius z of the neighboringpublic ArrayUtil getNeighborhoodKernel(int[] ker, int nbval, int x, int y, int z, float radx, float rady, float radz)
ker
- The kernel array (>0 ok)nbval
- The number of non-zero valuesx
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelradx
- Radius x of the neighboringradz
- Radius y of the neighboringrady
- Radius z of the neighboringpublic ArrayUtil getNeighborhoodKernelAdd(Object3D obj, ImageHandler img, int x, int y, int z)
public ArrayUtil getNeighborhoodKernelSubstract(Object3D obj, ImageHandler img, int x, int y, int z)
public ArrayUtil getNeighborhoodLayer(int x, int y, int z, float r0, float r1)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelr0
- Minimu radius valuer1
- Maximum radius valuepublic ArrayUtil getNeighborhoodLayer(int x, int y, int z, float r0, float r1, ImageHandler water)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelr0
- Minimu radius valuer1
- Maximum radius valuewater
- @Deprecated public java.util.ArrayList<Voxel3D> getNeighborhoodLayerList(int x, int y, int z, float r0, float r1)
@Deprecated public java.util.ArrayList<Voxel3D> getNeighborhoodLayerList(int x, int y, int z, float r0, float r1, ImageInt water)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelr0
- Minimu radius valuer1
- Maximum radius valuewater
- Watershed image, can be nullpublic ArrayUtil getNeighborhoodLayerAngle(int x, int y, int z, float r0, float r1, double angRef, Vector3D ref)
x
- Coordinate x of the pixely
- Coordinate y of the pixelz
- Coordinate z of the pixelr0
- Minimun radius valuer1
- Maximum radius valuepublic ArrayUtil getNeighborhoodBrick(int x, int y, int z, int stepx, int stepy, int stepz)
public ImageStack getImageStack()
public abstract void draw(Object3D o, float value)
@Deprecated public abstract void setPixel(int coord, float value)
public abstract void setPixel(Point3D point, float value)
public abstract void setPixel(Point3DInt point, float value)
public abstract void setPixel(int x, int y, int z, float value)
public void setPixelIncrement(int x, int y, int z, float inc)
public void setPixelIncrement(Point3D P, float inc)
public abstract void setPixel(int xy, int z, float value)
public abstract java.lang.Object getArray1D()
public abstract java.lang.Object getArray1D(int z)
@Deprecated public Calibration getCalibration()
@Deprecated public void setCalibration(Calibration cal)
public void setScale(double scaleXY, double scaleZ, java.lang.String unit)
public void setScale(ImageHandler other)
public void setOffset(ImageHandler other)
public void setOffset(int ox, int oy, int oz)
public double getScaleXY()
public java.lang.String getUnit()
public double getScaleZ()
public ImageHandler createSameDimensions()
public ImageHandler createSameType(int sx, int sy, int sz)
public ImageHandler addImage(ImageHandler image, float s1, float s2)
image
- The other images1
- The coefficient applied to thiss2
- The coefficient applied to other imagepublic ImageHandler addImage(ImageHandler image, int s1, int s2)
public ImageHandler multiplyImage(ImageHandler image, float coeff)
coeff
- The coefficient applied to thispublic ImageHandler powImage(double pow)
public ImageHandler divideImage(ImageHandler image, float coeff)
coeff
- The coefficient applied to thispublic void divideByValue(float coeff)
public void multiplyByValue(float coeff)
public void addValue(float val)
public ImageHandler duplicate()
public abstract ImageHandler deleteSlices(int zmin, int zmax)
public abstract void trimSlices(int zmin, int zmax)
public abstract void erase()
public void fill(double value)
public abstract void fill(double value, int min, int max)
public abstract boolean isOpened()
public boolean isVisible()
public void updateDisplay()
@Deprecated public double[] getMinAndMaxArray(java.util.ArrayList<? extends Point3D> mask)
public double[] getMinAndMaxArray(java.util.LinkedList<? extends Point3D> mask)
protected abstract void getMinAndMax(ImageInt mask)
public double getMin(ImageInt mask)
public double getMax(ImageInt mask)
public double getMin()
public double getMax()
public Voxel3D getMaxPosition()
public double getMean(ImageInt mask)
public double getMean()
public double[] getLineX(int x0, int y0, int z0, int length)
public double[] getLineY(int x0, int y0, int z0, int length)
public double[] getLineZ(int x0, int y0, int z0, int length)
public void setLineX(int x0, int y0, int z0, double[] line)
public void setLineY(int x0, int y0, int z0, double[] line)
public void setLineZ(int x0, int y0, int z0, double[] line)
public double[] extractLine(int x0, int y0, int z0, int x1, int y1, int z1, boolean interpolate)
public void setMinAndMax(ImageInt mask)
protected void getMoments(ImageInt mask)
public void setMinAndMax(float min, float max)
public int[] getHistogram(ImageInt mask)
public int[] getHistogram()
public int[] getHistogram(ImageInt mask, int nBins, double min, double max)
@Deprecated public int[] getHistogram(java.util.ArrayList<? extends Point3D> mask, int nBins, double min, double max)
public int[] getHistogram(java.util.LinkedList<? extends Point3D> mask, int nBins, double min, double max)
protected abstract int[] getHisto(ImageInt mask)
protected abstract int[] getHisto(ImageInt mask, int nBins, double min, double max)
public double getPercentile(double percent, ImageInt mask)
public void show()
public void show(java.lang.String title)
public void showDuplicate(java.lang.String title)
public void closeImagePlus()
public void flush()
public ImageStats getImageStats(ImageInt mask)
public void resetStats(ImageInt mask)
public void resetStats()
public void hide()
protected abstract void flushPixels()
public void save(java.lang.String directory, boolean addsuffix)
public void save(java.lang.String directory)
public void saveThumbNail(int sizeX, int sizeY, java.lang.String directory)
public byte[] getThumbNail(int sizeX, int sizeY)
public byte[] getThumbNail(int sizeX, int sizeY, ImageInt mask)
@Deprecated public ImagePlus getThumbnailImage(int sizeX, int sizeY, int minZ, int maxZ, ImageInt mask)
public byte[] getBinaryData() throws java.lang.OutOfMemoryError
java.lang.OutOfMemoryError
public boolean touchBorders(int x, int y, int z)
public abstract ImageByte thresholdRangeInclusive(float min, float max)
public abstract ImageByte thresholdRangeExclusive(float min, float max)
public abstract ImageByte threshold(float thld, boolean keepUnderThld, boolean strict)
public ImageByte thresholdAboveInclusive(float thld)
public ImageByte thresholdAboveExclusive(float thld)
public abstract void thresholdCut(float thld, boolean keepUnderThld, boolean strict)
public abstract ImageHandler cropRadius(int x0, int y0, int z0, int rx, int ry, int rz, boolean mean, boolean sphere)
x0
- the x coordinate of the center of the extractiony0
- the y coordinate of the center of the extractionz0
- the z coordinate of the center of the extractionrx
- radius X of new imagery
- radius Y of new imagerz
- radius Z of new imagesphere
- extract inside a spherepublic java.util.TreeMap<java.lang.Float,int[]> getBounds(boolean addBorder)
public abstract ImageHandler crop3D(java.lang.String title, int x_min, int x_max, int y_min, int y_max, int z_min, int z_max)
public abstract ImageHandler[] crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds)
public abstract ImageHandler crop3DMask(java.lang.String title, ImageInt mask, float label, int x_min_, int x_max_, int y_min_, int y_max_, int z_min_, int z_max_)
public void insert(ImageHandler vol, int x0, int y0, int z0, boolean average)
vol
- the 3D image to be insertedx0
- the x coordinate of the insertiony0
- the y coordinate of the insertionz0
- the z coordinate of the insertionaverage
- average with original image or notpublic void insertMask(ImageHandler vol, int x0, int y0, int z0)
public void transfertPixelValues(ImageHandler other, float val, float rep)
public ImageHandler enlarge(int dx, int dy, int dz)
public abstract ImageHandler resize(int dX, int dY, int dZ)
dX
- the border to add in X, both on left and rightdY
- the border to add in Y, both on top and bottomdZ
- the border to add in Z, both above and belowpublic abstract ImageHandler resample(int newX, int newY, int newZ, int method)
newX
- the new size in XnewY
- the new size in YnewZ
- the new size in Zmethod
- the interpolation method, see ImageProcessorpublic abstract ImageHandler resample(int newZ, int method)
newZ
- the new size in Zmethod
- the method, see ImageProcessorprotected abstract ImageFloat normalize_(ImageInt mask, double saturation)
public abstract ImageFloat normalize(double min, double max)
public ImageFloat normalize(ImageInt mask, double saturation)
public ImageHandler normaliseValue(float meanV, float sdV)
public abstract void invert(ImageInt mask)
public void invert()
public void invertBackground(float bckg, float value)
@Deprecated public ImageFloat substractImage(ImageHandler other)
public ImageFloat subtractImage(ImageHandler other)
@Deprecated public abstract void intersectMask(ImageInt mask)
public abstract void intersectMask(ImageHandler mask)
public abstract void intersectMask2D(ImageInt mask, int z)
public ImageFloat getDistanceMap(float thld, float scaleXY, float scaleZ, boolean invert, int nbCPUs)
public void set332RGBLut()
public void setGraysLut()
public float getMinAboveValue(float value)
value
- Description of the Parameterpublic float getMaxBelowValue(float value)
public boolean isBinary(int background)
public boolean isBinary()
public double[] radialDistribution(int x0, int y0, int z0, int maxR, ImageInt water)
public double[] radialDistribution(int x0, int y0, int z0, int maxR, int measure, ImageHandler water)
x0
- Coordinate x of the pixely0
- Coordinate y of the pixelz0
- Coordinate z of the pixelmaxR
- maximu radiuswater
- public double[] radialDistribution(int x0, int y0, int z0, int maxR)
x0
- Coordinate x of the pixely0
- Coordinate y of the pixelz0
- Coordinate z of the pixelmaxR
- maximu radiuspublic boolean hasOneValue(float f)
public void replacePixelsValue(int val, int rep)
val
- the value to be replacedrep
- the new valuepublic void replacePixelsValueFloat(float val, float rep)
public void replacePixelsValue(int val1, int rep1, int val2, int rep2)
public java.util.List<Voxel3D> createListVoxels(int thresh)