public class ImageByte extends ImageInt
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 |
---|---|
byte[][] |
pixels |
Modifier | Constructor and Description |
---|---|
|
ImageByte(byte[][] pixels,
java.lang.String title,
int sizeX) |
|
ImageByte(ImageHandler im,
boolean scaling) |
|
ImageByte(ImagePlus img) |
|
ImageByte(ImageStack stack) |
protected |
ImageByte(int sizeX,
int sizeY,
int sizeZ) |
|
ImageByte(java.lang.String title,
int sizeX,
int sizeY,
int sizeZ) |
Modifier and Type | Method and Description |
---|---|
void |
addMask(ImageInt mask) |
static byte[] |
convert(float[] input,
boolean scaling) |
static byte[] |
convert(short[] input,
boolean scaling) |
ImageFloat |
convertToFloat(boolean scaling) |
ImageShort |
convertToShort(boolean scaling) |
void |
copy(ImageByte destination) |
int |
countMaskVolume() |
ImageByte |
crop3D(java.lang.String title,
int x_min_,
int x_max_,
int y_min_,
int y_max_,
int z_min_,
int z_max_) |
ImageByte[] |
crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds) |
ImageByte |
crop3DBinary(java.lang.String title,
float label,
int x_min_,
int x_max_,
int y_min_,
int y_max_,
int z_min_,
int z_max_) |
ImageByte |
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 |
deleteSlices(int zmin,
int zmax) |
void |
draw(Object3D o,
float value) |
void |
draw(Object3D o,
int value) |
ImageByte |
duplicate() |
void |
erase() |
void |
fill(double value,
int min,
int max) |
protected void |
flushPixels() |
java.lang.Object |
getArray1D() |
java.lang.Object |
getArray1D(int z) |
static byte[] |
getArray1DByte(ImagePlus img) |
protected int[] |
getHisto(ImageInt mask) |
protected int[] |
getHisto(ImageInt mask,
int nBins,
double min,
double max) |
static ImagePlus |
getImagePlus(byte[] pixels,
int sizeX,
int sizeY,
int sizeZ,
boolean setMinAndMax) |
protected void |
getMinAndMax(ImageInt mask) |
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 |
getPixel(Voxel3D vox,
boolean approx) |
int |
getPixelInt(int coord)
Deprecated.
|
int |
getPixelInt(IntCoord3D vox) |
int |
getPixelInt(int xy,
int z) |
int |
getPixelInt(int x,
int y,
int z) |
int |
getPixelInt(Point3D P) |
float |
getPixelInterpolated(Point3D P) |
int |
getPixelIntInterpolated(Point3D P) |
double |
getSizeInMb() |
int |
getType() |
void |
intersectMask(ImageHandler mask) |
void |
intersectMask(ImageInt mask)
Deprecated.
|
void |
intersectMask2D(ImageInt mask,
int z) |
void |
invert(ImageInt mask) |
boolean |
isOpened() |
protected ImageFloat |
normalize_(ImageInt mask,
double saturation) |
ImageFloat |
normalize(double min,
double max) |
ImageByte |
resample(int newZ,
int method)
Rescale the image to new dimension, only in Z
|
ImageByte |
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 xy,
int z,
int value) |
void |
setPixel(int x,
int y,
int z,
float value) |
void |
setPixel(int x,
int y,
int z,
int value) |
void |
setPixel(Point3D point,
float value) |
void |
setPixelCross3D(int x,
int y,
int z,
int value) |
boolean |
shiftIndexes(java.util.TreeMap<java.lang.Integer,int[]> bounds) |
void |
substractMask(ImageInt mask) |
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) |
ImageByte |
toMask() |
void |
trimSlices(int zmin,
int zmax) |
adaptiveFilter, adaptiveFilter, addImage, crop3DBinary, crop3DBinary, cropRadius, diffAbsImage, erode, filterGeneric, filterGeneric, filterGeneric, filterGeneric, filterPooling, filterPooling, firstVoxelValueInt, getDistanceMapInsideMask, getListMaxima, getListMaxima, getObject3DBackground, getObjectMask, getObjects3D, getObjects3D, getObjects3DPopulation, getUniqueValues, getUniqueValues, hasOneValueInt, invertMask, isBinary, isBinary, mathGeneric, operationGeneric, projectAVG, replacePixelsValue, replacePixelsValue, replacePixelsValue, replacePixelsValue, sobelFilter, substractImage, subtractImage, subtractImageInt, toCenterMask, wrap, wrap
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, 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, invert, invertBackground, isVisible, maskContains, merge3D, merge3DBinary, merge3DRaw, multiplyByValue, multiplyImage, newBlankImageHandler, normaliseValue, normalize, openImage, powImage, radialDistribution, radialDistribution, radialDistribution, 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, zoom
public ImageByte(ImagePlus img)
public ImageByte(ImageStack stack)
public ImageByte(byte[][] pixels, java.lang.String title, int sizeX)
public ImageByte(java.lang.String title, int sizeX, int sizeY, int sizeZ)
protected ImageByte(int sizeX, int sizeY, int sizeZ)
public ImageByte(ImageHandler im, boolean scaling)
public static byte[] getArray1DByte(ImagePlus img)
public static ImagePlus getImagePlus(byte[] pixels, int sizeX, int sizeY, int sizeZ, boolean setMinAndMax)
public static byte[] convert(float[] input, boolean scaling)
public static byte[] convert(short[] input, boolean scaling)
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 ImageFloat convertToFloat(boolean scaling)
public void erase()
erase
in class ImageHandler
public void fill(double value, int min, int max)
fill
in class ImageHandler
public void copy(ImageByte destination)
public float getPixel(int xy, int z)
getPixel
in class ImageHandler
@Deprecated public float getPixel(int coord)
getPixel
in class ImageHandler
public float getPixel(Voxel3D vox, boolean approx)
public float getPixel(int x, int y, int z)
getPixel
in class ImageHandler
public int getPixelInt(int xy, int z)
getPixelInt
in class ImageInt
@Deprecated public int getPixelInt(int coord)
getPixelInt
in class ImageInt
public int getPixelInt(int x, int y, int z)
getPixelInt
in class ImageInt
public float getPixel(IntCoord3D vox)
public int getPixelInt(IntCoord3D vox)
@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(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
public void setPixel(int x, int y, int z, int value)
public void setPixelCross3D(int x, int y, int z, int value)
setPixelCross3D
in class ImageInt
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 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 ImageByte crop3D(java.lang.String title, int x_min_, int x_max_, int y_min_, int y_max_, int z_min_, int z_max_)
public boolean shiftIndexes(java.util.TreeMap<java.lang.Integer,int[]> bounds)
shiftIndexes
in class ImageInt
public ImageByte[] crop3D(java.util.TreeMap<java.lang.Float,int[]> bounds)
public ImageByte 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 ImageInt
public ImageByte crop3DBinary(java.lang.String title, float label, int x_min_, int x_max_, int y_min_, int y_max_, int z_min_, int z_max_)
crop3DBinary
in class ImageInt
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 ImageByte resample(int newX, int newY, int newZ, int method)
ImageHandler
public ImageByte resample(int newZ, int method)
protected ImageFloat normalize_(ImageInt mask, double saturation)
normalize_
in class ImageHandler
public ImageFloat normalize(double min, double max)
normalize
in class ImageHandler
public void invert(ImageInt mask)
invert
in class ImageHandler
public void draw(Object3D o, float value)
draw
in class ImageHandler
protected void flushPixels()
flushPixels
in class ImageHandler
public boolean isOpened()
isOpened
in class ImageHandler
public float getPixel(Point3DInt P)
getPixel
in class ImageHandler
public int getPixelInt(Point3D P)
getPixelInt
in class ImageInt
public float getPixelInterpolated(Point3D P)
getPixelInterpolated
in class ImageInt
public int getPixelIntInterpolated(Point3D P)
getPixelIntInterpolated
in class ImageInt
public ImageHandler deleteSlices(int zmin, int zmax)
deleteSlices
in class ImageHandler
public void trimSlices(int zmin, int zmax)
trimSlices
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
public void substractMask(ImageInt mask)
public void addMask(ImageInt mask)
public double getSizeInMb()
getSizeInMb
in class ImageHandler
public int getType()
getType
in class ImageHandler
public int countMaskVolume()
countMaskVolume
in class ImageInt