public class ImageFloat extends ImageHandler
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 |
---|---|
float[][] |
pixels |
Constructor and Description |
---|
ImageFloat(float[][] pixels,
java.lang.String title,
int sizeX) |
ImageFloat(ImagePlus img) |
ImageFloat(ImageStack img) |
ImageFloat(java.lang.String title,
int sizeX,
int sizeY,
int sizeZ) |
Modifier and Type | Method and Description |
---|---|
ImageFloat |
adaptiveFilter(float radx,
float rady,
float radz,
int nbcpus)
Deprecated.
|
void |
adaptiveFilter(ImageFloat filtered,
float radx,
float rady,
float radz,
int zmin,
int zmax,
Chrono timer,
AbstractLog show) |
static float[] |
convert(byte[] input) |
static float[] |
convert(short[] input) |
ImageByte |
convertToByte(boolean scaling) |
ImageShort |
convertToShort(boolean scaling) |
void |
copy(ImageFloat destination) |
ImageFloat |
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
|
ImageFloat[] |
crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds) |
ImageFloat |
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_) |
ImageHandler |
cropRadius(int xc,
int yc,
int zc,
int rx,
int ry,
int rz,
boolean mean,
boolean sphere)
Extract a 3D image from a specified location as the center of crop
|
ImageHandler |
deleteSlices(int zmin,
int zmax) |
void |
draw(Object3D o,
float value) |
ImageFloat |
duplicate() |
void |
erase() |
void |
fill(double value,
int min,
int max) |
void |
filterGeneric(ImageFloat out,
float radx,
float rady,
float radz,
int zmin,
int zmax,
int filter)
3D filter using threads
|
void |
filterGeneric(ImageFloat out,
float radx,
float rady,
float radz,
int zmin,
int zmax,
int filter,
Chrono timer,
AbstractLog log)
3D filter using threads
|
void |
filterGeneric(ImageFloat out,
Object3DVoxels obj,
int zmin,
int zmax,
int filter) |
void |
filterGeneric(ImageFloat out,
Object3DVoxels obj,
int zmin,
int zmax,
int filter,
Chrono timer,
AbstractLog log) |
protected void |
flushPixels() |
java.lang.Object |
getArray1D() |
java.lang.Object |
getArray1D(int z) |
static float[] |
getArray1DFloat(ImagePlus img) |
protected int[] |
getHisto(ImageInt mask) |
protected int[] |
getHisto(ImageInt mask,
int nBins,
double min,
double max) |
static ImagePlus |
getImagePlus(float[] pixels,
int sizeX,
int sizeY,
int sizeZ,
boolean setMinAndMax) |
static ImagePlus |
getImagePlus(int[] pixels,
int sizeX,
int sizeY,
int sizeZ,
boolean setMinAndMax) |
java.util.ArrayList<Voxel3DComparable> |
getListMaxima(float radx,
float rady,
float radz,
int zmin,
int zmax) |
java.util.ArrayList<Voxel3DComparable> |
getListMaxima(float radx,
float rady,
float radz,
int zmin,
int zmax,
Chrono timer,
AbstractLog log) |
protected void |
getMinAndMax(ImageInt mask) |
float |
getPixel(Coordinate3D coord) |
float |
getPixel(int coord)
Deprecated.
|
float |
getPixel(IntCoord3D vox) |
float |
getPixel(int xy,
int z) |
float |
getPixel(int x,
int y,
int z) |
float |
getPixel(Point3D P) |
float |
getPixel(Point3DInt P) |
float |
getPixelInterpolated(Point3D P) |
double |
getSizeInMb() |
int |
getType() |
void |
intersectMask(ImageFloat mask)
Deprecated.
|
void |
intersectMask(ImageHandler mask) |
void |
intersectMask(ImageInt mask)
Deprecated.
|
void |
intersectMask2D(ImageInt mask,
int z) |
void |
invert(ImageInt mask) |
boolean |
isOpened() |
void |
mathGeneric(ImageFloat other,
ImageFloat out,
int zmin,
int zmax,
int operation,
float par1,
float par2,
Chrono timer,
AbstractLog log)
Generic arithmetic between images
pixel1*parameter1 OPERATION pixel2*parameter2
|
static ImageFloat |
newBlankImageFloat(java.lang.String title,
ImageHandler ih) |
protected ImageFloat |
normalize_(ImageInt mask,
double saturation) |
ImageFloat |
normalize(double min,
double max) |
void |
operationGeneric(ImageFloat out,
int zmin,
int zmax,
int operation,
float par1,
float par2,
Chrono timer,
AbstractLog log) |
void |
opposite() |
ImageHandler |
resample(int newZ,
int method)
Rescale the image to new dimension, only in Z
|
ImageHandler |
resample(int newX,
int newY,
int newZ,
int method)
Rescale the image to new dimension, in X Y and Z
|
ImageHandler |
resize(int dX,
int dY,
int dZ)
Enlarge the canvas size of the image in X, Y and Z .
|
void |
setPixel(int coord,
float value)
Deprecated.
|
void |
setPixel(int xy,
int z,
float value) |
void |
setPixel(int x,
int y,
int z,
float value) |
void |
setPixel(Point3D point,
float value) |
void |
setPixel(Point3DInt point,
float value) |
ImageFloat |
sobelFilter()
Sobel-like filtering in 3D
|
void |
subtract(ImageFloat other) |
ImageByte |
threshold(float thld,
boolean keepUnderThld,
boolean strict) |
void |
thresholdCut(float thld,
boolean keepUnderThld,
boolean strict) |
ImageByte |
thresholdRangeExclusive(float min,
float max) |
ImageByte |
thresholdRangeInclusive(float min,
float max) |
void |
trimSlices(int zmin,
int zmax) |
addImage, addImage, addValue, closeImagePlus, contains, contains, contains, contains, convertToByte, convertToByte, createListVoxels, createSameDimensions, createSameType, divideByValue, divideImage, enlarge, extractLine, fill, flush, getBinaryData, getBounds, getCalibration, getDistanceMap, getHistogram, getHistogram, getHistogram, getHistogram, getHistogram, getHyperStack, getImagePlus, getImageStack, getImageStats, getLineX, getLineY, getLineZ, getMax, getMax, getMaxBelowValue, getMaxPosition, getMean, getMean, getMin, getMin, getMinAboveValue, getMinAndMaxArray, getMinAndMaxArray, getMoments, getNeighborhood, getNeighborhood3x3x3, getNeighborhood3x3x3CenterList, getNeighborhood3x3x3ListCenter, getNeighborhood3x3x3ListNoCenter, getNeighborhood3x3x3NoCenterList, getNeighborhood3x3x3NoCenterListInt, getNeighborhoodBrick, getNeighborhoodCross3D, getNeighborhoodCross3DList, getNeighborhoodKernel, getNeighborhoodKernel, getNeighborhoodKernelAdd, getNeighborhoodKernelSubstract, getNeighborhoodLayer, getNeighborhoodLayer, getNeighborhoodLayerAngle, getNeighborhoodLayerList, getNeighborhoodLayerList, getNeighborhoodSphere, getNeighborhoodXY3x3, getPercentile, getPixel, getPixel, getScaleXY, getScaleZ, getThumbNail, getThumbNail, getThumbnailImage, getTitle, getUnit, hasOneValue, hide, homogenizeBitDepth, insert, insertMask, invert, invertBackground, isBinary, isBinary, isVisible, maskContains, merge3D, merge3DBinary, merge3DRaw, multiplyByValue, multiplyImage, newBlankImageHandler, normaliseValue, normalize, openImage, powImage, radialDistribution, radialDistribution, radialDistribution, replacePixelsValue, replacePixelsValue, replacePixelsValueFloat, resetStats, resetStats, sameDimensions, sameDimensions, sameDimentions, sameDimentions, save, save, saveThumbNail, set332RGBLut, setCalibration, setGraysLut, setLineX, setLineY, setLineZ, setMinAndMax, setMinAndMax, setOffset, setOffset, setPixelIncrement, setPixelIncrement, setScale, setScale, setTitle, show, show, showDuplicate, substractImage, subtractImage, thresholdAboveExclusive, thresholdAboveInclusive, ToByte, touchBorders, transfertPixelValues, updateDisplay, wrap, wrap, zoom
public ImageFloat(ImagePlus img)
public ImageFloat(ImageStack img)
public ImageFloat(float[][] pixels, java.lang.String title, int sizeX)
public ImageFloat(java.lang.String title, int sizeX, int sizeY, int sizeZ)
public static ImageFloat newBlankImageFloat(java.lang.String title, ImageHandler ih)
public static float[] getArray1DFloat(ImagePlus img)
public static ImagePlus getImagePlus(float[] pixels, int sizeX, int sizeY, int sizeZ, boolean setMinAndMax)
public static ImagePlus getImagePlus(int[] pixels, int sizeX, int sizeY, int sizeZ, boolean setMinAndMax)
public static float[] convert(short[] input)
public static float[] convert(byte[] input)
public java.lang.Object getArray1D()
getArray1D
in class ImageHandler
public java.lang.Object getArray1D(int z)
getArray1D
in class ImageHandler
public ImageShort convertToShort(boolean scaling)
public ImageByte convertToByte(boolean scaling)
public void erase()
erase
in class ImageHandler
public void fill(double value, int min, int max)
fill
in class ImageHandler
public ImageFloat duplicate()
duplicate
in class ImageHandler
public void copy(ImageFloat destination)
@Deprecated public float getPixel(int coord)
getPixel
in class ImageHandler
public float getPixel(IntCoord3D vox)
public float getPixel(Coordinate3D coord)
public float getPixel(int x, int y, int z)
getPixel
in class ImageHandler
public float getPixel(int xy, int z)
getPixel
in class ImageHandler
@Deprecated public void setPixel(int coord, float value)
setPixel
in class ImageHandler
public void setPixel(Point3D point, float value)
setPixel
in class ImageHandler
public void setPixel(Point3DInt point, float value)
setPixel
in class ImageHandler
public void setPixel(int x, int y, int z, float value)
setPixel
in class ImageHandler
public void setPixel(int xy, int z, float value)
setPixel
in class ImageHandler
protected void getMinAndMax(ImageInt mask)
getMinAndMax
in class ImageHandler
protected int[] getHisto(ImageInt mask)
getHisto
in class ImageHandler
protected int[] getHisto(ImageInt mask, int nBins, double min, double max)
getHisto
in class ImageHandler
public void draw(Object3D o, float value)
draw
in class ImageHandler
public ImageByte thresholdRangeInclusive(float min, float max)
thresholdRangeInclusive
in class ImageHandler
public ImageByte thresholdRangeExclusive(float min, float max)
thresholdRangeExclusive
in class ImageHandler
public ImageByte threshold(float thld, boolean keepUnderThld, boolean strict)
threshold
in class ImageHandler
public void thresholdCut(float thld, boolean keepUnderThld, boolean strict)
thresholdCut
in class ImageHandler
public ImageFloat crop3D(java.lang.String title, int x_min_, int x_max_, int y_min_, int y_max_, int z_min_, int z_max_)
ImageHandler
crop3D
in class ImageHandler
public ImageFloat[] crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds)
crop3D
in class ImageHandler
public ImageFloat 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_)
crop3DMask
in class ImageHandler
public ImageHandler resize(int dX, int dY, int dZ)
ImageHandler
resize
in class ImageHandler
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 ImageHandler resample(int newX, int newY, int newZ, int method)
ImageHandler
resample
in class ImageHandler
newX
- the new size in XnewY
- the new size in YnewZ
- the new size in Zmethod
- the interpolation method, see ImageProcessorpublic ImageHandler resample(int newZ, int method)
ImageHandler
resample
in class ImageHandler
newZ
- the new size in Zmethod
- the method, see ImageProcessorprotected ImageFloat normalize_(ImageInt mask, double saturation)
normalize_
in class ImageHandler
public ImageFloat normalize(double min, double max)
normalize
in class ImageHandler
@Deprecated public void intersectMask(ImageInt mask)
intersectMask
in class ImageHandler
public void intersectMask(ImageHandler mask)
intersectMask
in class ImageHandler
public void intersectMask2D(ImageInt mask, int z)
intersectMask2D
in class ImageHandler
@Deprecated public void intersectMask(ImageFloat mask)
public void invert(ImageInt mask)
invert
in class ImageHandler
public void opposite()
public void subtract(ImageFloat other)
protected void flushPixels()
flushPixels
in class ImageHandler
public boolean isOpened()
isOpened
in class ImageHandler
public float getPixel(Point3D P)
getPixel
in class ImageHandler
public float getPixel(Point3DInt P)
getPixel
in class ImageHandler
public float getPixelInterpolated(Point3D P)
getPixelInterpolated
in class ImageHandler
public ImageHandler cropRadius(int xc, int yc, int zc, int rx, int ry, int rz, boolean mean, boolean sphere)
ImageHandler
cropRadius
in class ImageHandler
xc
- the x coordinate of the center of the extractionyc
- the y coordinate of the center of the extractionzc
- 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 void filterGeneric(ImageFloat out, float radx, float rady, float radz, int zmin, int zmax, int filter)
out
- radx
- Radius of mean filter in xrady
- Radius of mean filter in yradz
- Radius of mean filter in zzmin
- zmax
- filter
- public void filterGeneric(ImageFloat out, float radx, float rady, float radz, int zmin, int zmax, int filter, Chrono timer, AbstractLog log)
out
- radx
- Radius of mean filter in xrady
- Radius of mean filter in yradz
- Radius of mean filter in zzmin
- zmax
- filter
- public void filterGeneric(ImageFloat out, Object3DVoxels obj, int zmin, int zmax, int filter)
public void filterGeneric(ImageFloat out, Object3DVoxels obj, int zmin, int zmax, int filter, Chrono timer, AbstractLog log)
public void mathGeneric(ImageFloat other, ImageFloat out, int zmin, int zmax, int operation, float par1, float par2, Chrono timer, AbstractLog log)
other
- other imageout
- result imagezmin
- minimum Zzmax
- maximum Zoperation
- filter ADD MULT ...par1
- parameter1par2
- parameter2timer
- timer for timelog
- logger for printpublic void operationGeneric(ImageFloat out, int zmin, int zmax, int operation, float par1, float par2, Chrono timer, AbstractLog log)
public ImageFloat sobelFilter()
public void adaptiveFilter(ImageFloat filtered, float radx, float rady, float radz, int zmin, int zmax, Chrono timer, AbstractLog show)
@Deprecated public ImageFloat adaptiveFilter(float radx, float rady, float radz, int nbcpus)
radx
- radz
- rady
- public ImageHandler deleteSlices(int zmin, int zmax)
deleteSlices
in class ImageHandler
public void trimSlices(int zmin, int zmax)
trimSlices
in class ImageHandler
public double getSizeInMb()
getSizeInMb
in class ImageHandler
public int getType()
getType
in class ImageHandler
public java.util.ArrayList<Voxel3DComparable> getListMaxima(float radx, float rady, float radz, int zmin, int zmax)
public java.util.ArrayList<Voxel3DComparable> getListMaxima(float radx, float rady, float radz, int zmin, int zmax, Chrono timer, AbstractLog log)