Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
FloatProcessor Class Reference
Inheritance diagram for FloatProcessor:
ImageProcessor FHT

Public Member Functions

 FloatProcessor (int width, int height, float[] pixels, ColorModel cm)
 
 FloatProcessor (int width, int height)
 
 FloatProcessor (int width, int height, int[] pixels)
 
 FloatProcessor (int width, int height, double[] pixels)
 
void findMinAndMax ()
 
void setMinAndMax (double min, double max)
 
void resetMinAndMax ()
 
double getMin ()
 
double getMax ()
 
Image createImage ()
 
ImageProcessor createProcessor (int width, int height)
 
void snapshot ()
 
void reset ()
 
void reset (ImageProcessor mask)
 
int getPixel (int x, int y)
 
int[] getPixel (int x, int y, int[] iArray)
 
void putPixel (int x, int y, int[] iArray)
 
double getInterpolatedPixel (double x, double y)
 
void putPixel (int x, int y, int value)
 
void putPixelValue (int x, int y, double value)
 
float getPixelValue (int x, int y)
 
void drawPixel (int x, int y)
 
Object getPixels ()
 
Object getPixelsCopy ()
 
void setPixels (Object pixels)
 
void copyBits (ImageProcessor ip, int xloc, int yloc, int mode)
 
void applyTable (int[] lut)
 
void invert ()
 
void add (int value)
 
void add (double value)
 
void multiply (double value)
 
void and (int value)
 
void or (int value)
 
void xor (int value)
 
void gamma (double value)
 
void log ()
 
void sqr ()
 
void sqrt ()
 
void min (double value)
 
void max (double value)
 
void fill ()
 
void fill (ImageProcessor mask)
 
void convolve3x3 (int[] kernel)
 
void filter (int type)
 
void rotate (double angle)
 
void flipVertical ()
 
void noise (double range)
 
ImageProcessor crop ()
 
void scale (double xScale, double yScale)
 
ImageProcessor resize (int dstWidth, int dstHeight)
 
void setColor (Color color)
 
void setValue (double value)
 
void setThreshold (double minThreshold, double maxThreshold, int lutUpdate)
 
void convolve (float[] kernel, int kernelWidth, int kernelHeight)
 
void threshold (int level)
 
void autoThreshold ()
 
void medianFilter ()
 
int[] getHistogram ()
 
void erode ()
 
void dilate ()
 
- Public Member Functions inherited from ImageProcessor
int getWidth ()
 
int getHeight ()
 
ColorModel getColorModel ()
 
void setColorModel (ColorModel cm)
 
void invertLut ()
 
int getBestIndex (Color c)
 
boolean isInvertedLut ()
 
boolean isColorLut ()
 
boolean isPseudoColorLut ()
 
void setColor (int value)
 
void resetMinAndMax ()
 
void setThreshold (double minThreshold, double maxThreshold, int lutUpdate)
 
void resetThreshold ()
 
double getMinThreshold ()
 
double getMaxThreshold ()
 
void setRoi (Rectangle roi)
 
void setRoi (int x, int y, int rwidth, int rheight)
 
void setRoi (ij.gui.Roi roi)
 
void setRoi (Polygon roi)
 
void resetRoi ()
 
Rectangle getRoi ()
 
void setMask (ImageProcessor mask)
 
ImageProcessor getMask ()
 
byte[] getMaskArray ()
 
void setProgressBar (ProgressBar pb)
 
void setInterpolate (boolean interpolate)
 
boolean getInterpolate ()
 
boolean isKillable ()
 
double[] getLine (double x1, double y1, double x2, double y2)
 
void getRow (int x, int y, int[] data, int length)
 
void getColumn (int x, int y, int[] data, int length)
 
void putRow (int x, int y, int[] data, int length)
 
void putColumn (int x, int y, int[] data, int length)
 
void moveTo (int x, int y)
 
void setLineWidth (int width)
 
void lineTo (int x2, int y2)
 
void drawLine (int x1, int y1, int x2, int y2)
 
void drawRect (int x, int y, int width, int height)
 
void drawPolygon (Polygon p)
 
void fillPolygon (Polygon p)
 
void drawDot2 (int x, int y)
 
void drawDot (int xcenter, int ycenter)
 
void drawString (String s)
 
void drawString (String s, int x, int y)
 
void setJustification (int justification)
 
void setFont (Font font)
 
void setAntialiasedText (boolean antialiasedText)
 
int getStringWidth (String s)
 
FontMetrics getFontMetrics ()
 
void smooth ()
 
void sharpen ()
 
void findEdges ()
 
void flipHorizontal ()
 
ImageProcessor rotateRight ()
 
ImageProcessor rotateLeft ()
 
void insert (ImageProcessor ip, int xloc, int yloc)
 
String toString ()
 
void fill ()
 
void setCalibrationTable (float[] cTable)
 
void setHistogramSize (int size)
 
int getHistogramSize ()
 
void setHistogramRange (double histMin, double histMax)
 
double getHistogramMin ()
 
double getHistogramMax ()
 
int[] getPixel (int x, int y, int[] iArray)
 
void putPixel (int x, int y, int[] iArray)
 
double getInterpolatedValue (double x, double y)
 
void invert ()
 
void add (int value)
 
void add (double value)
 
void multiply (double value)
 
void and (int value)
 
void or (int value)
 
void xor (int value)
 
void gamma (double value)
 
void log ()
 
void sqr ()
 
void sqrt ()
 
void min (double value)
 
void max (double value)
 
ImageProcessor duplicate ()
 
void setLutAnimation (boolean lutAnimation)
 
ImageProcessor convertToByte (boolean doScaling)
 
ImageProcessor convertToShort (boolean doScaling)
 
ImageProcessor convertToFloat ()
 
ImageProcessor convertToRGB ()
 
void autoThreshold ()
 
int getAutoThreshold ()
 
int getAutoThreshold (int[] histogram)
 
void setClipRect (Rectangle clipRect)
 

Additional Inherited Members

- Static Public Attributes inherited from ImageProcessor
static final int BLACK = 0xFF000000
 
static final double NO_THRESHOLD = -808080.0
 
static final int LEFT_JUSTIFY = 0
 
static final int CENTER_JUSTIFY = 1
 
static final int RIGHT_JUSTIFY = 2
 
static final int RED_LUT =0
 
- Protected Member Functions inherited from ImageProcessor
void showProgress (double percentDone)
 
void hideProgress ()
 
void makeDefaultColorModel ()
 
String maskSizeError (ImageProcessor mask)
 
- Protected Attributes inherited from ImageProcessor
int lineWidth = 1
 
int cx
 
Font font
 
FontMetrics fontMetrics
 
boolean antialiasedText
 
boolean boldFont
 
int width
 
int height
 
int roiX
 
int xMin
 
ColorModel baseCM
 
ColorModel cm
 
byte[] rLUT1
 
byte[] rLUT2
 
boolean interpolate
 
double minThreshold =NO_THRESHOLD
 
int histogramSize = 256
 
double histogramMin
 
float[] cTable
 
boolean lutAnimation
 
MemoryImageSource source
 
Image img
 
boolean newPixels
 
Color drawingColor = Color.black
 
int clipXMin
 
int justification = LEFT_JUSTIFY
 
boolean inversionTested = false
 
boolean invertedLut
 

Detailed Description

This is an 32-bit floating-point image and methods that operate on that image.

Definition at line 9 of file FloatProcessor.java.

Constructor & Destructor Documentation

FloatProcessor ( int  width,
int  height,
float[]  pixels,
ColorModel  cm 
)
inline

Creates a new FloatProcessor using the specified pixel array and ColorModel. Set 'cm' to null to use the default grayscale LUT.

Definition at line 22 of file FloatProcessor.java.

FloatProcessor ( int  width,
int  height 
)
inline

Creates a blank FloatProcessor using the default grayscale LUT that displays zero as black. Call invertLut() to display zero as white.

Definition at line 36 of file FloatProcessor.java.

FloatProcessor ( int  width,
int  height,
int[]  pixels 
)
inline

Creates a FloatProcessor from an int array using the default grayscale LUT.

Definition at line 41 of file FloatProcessor.java.

FloatProcessor ( int  width,
int  height,
double[]  pixels 
)
inline

Creates a FloatProcessor from a double array using the default grayscale LUT.

Definition at line 49 of file FloatProcessor.java.

Member Function Documentation

void applyTable ( int[]  lut)
inlinevirtual

Transforms the image or ROI using a lookup table. The length of the table must be 256 for byte images and 65536 for short images. RGB and float images are not supported.

Implements ImageProcessor.

Definition at line 286 of file FloatProcessor.java.

void autoThreshold ( )
inline

Not implemented.

Definition at line 747 of file FloatProcessor.java.

void convolve ( float[]  kernel,
int  kernelWidth,
int  kernelHeight 
)
inlinevirtual

Performs a convolution operation using the specified kernel.

Implements ImageProcessor.

Definition at line 739 of file FloatProcessor.java.

void convolve3x3 ( int[]  kernel)
inlinevirtual

3x3 convolution contributed by Glynne Casteel.

Implements ImageProcessor.

Definition at line 404 of file FloatProcessor.java.

void copyBits ( ImageProcessor  ip,
int  xloc,
int  yloc,
int  mode 
)
inlinevirtual

Copies the image contained in 'ip' to (xloc, yloc) using one of the transfer modes defined in the Blitter interface.

Implements ImageProcessor.

Definition at line 280 of file FloatProcessor.java.

Image createImage ( )
inlinevirtual

Returns a copy of this image is the form of an AWT Image.

Implements ImageProcessor.

Definition at line 117 of file FloatProcessor.java.

ImageProcessor createProcessor ( int  width,
int  height 
)
inlinevirtual

Returns a new, blank FloatProcessor with the specified width and height.

Implements ImageProcessor.

Definition at line 152 of file FloatProcessor.java.

ImageProcessor crop ( )
inlinevirtual

Creates a new processor containing an image that corresponds to the current ROI.

Implements ImageProcessor.

Definition at line 583 of file FloatProcessor.java.

void dilate ( )
inlinevirtual

Not implemented.

Implements ImageProcessor.

Definition at line 755 of file FloatProcessor.java.

void drawPixel ( int  x,
int  y 
)
inlinevirtual

Draws a pixel in the current foreground color.

Implements ImageProcessor.

Definition at line 249 of file FloatProcessor.java.

void erode ( )
inlinevirtual

Not implemented.

Implements ImageProcessor.

Definition at line 753 of file FloatProcessor.java.

void fill ( )
inline

Fills the current rectangular ROI.

Definition at line 381 of file FloatProcessor.java.

void fill ( ImageProcessor  mask)
inlinevirtual

Fills pixels that are within roi and part of the mask. Throws an IllegalArgumentException if the mask is null or the size of the mask is not the same as the size of the ROI.

Implements ImageProcessor.

Definition at line 386 of file FloatProcessor.java.

void filter ( int  type)
inlinevirtual

Filters using a 3x3 neighborhood.

Implements ImageProcessor.

Definition at line 453 of file FloatProcessor.java.

void findMinAndMax ( )
inline

Calculates the minimum and maximum pixel value for the entire image. Returns without doing anything if fixedScale has been set true as a result of calling setMinAndMax(). In this case, getMin() and getMax() return the fixed min and max defined by setMinAndMax(), rather than the calculated min and max.

See Also
getMin()
getMin()

Definition at line 65 of file FloatProcessor.java.

void flipVertical ( )
inlinevirtual

Flips the image or ROI vertically.

Implements ImageProcessor.

Definition at line 552 of file FloatProcessor.java.

int [] getHistogram ( )
inlinevirtual

Not implemented.

Implements ImageProcessor.

Definition at line 751 of file FloatProcessor.java.

double getInterpolatedPixel ( double  x,
double  y 
)
inlinevirtual

Uses bilinear interpolation to find the pixel value at real coordinates (x,y).

Implements ImageProcessor.

Definition at line 220 of file FloatProcessor.java.

double getMax ( )
inlinevirtual

Returns the largest displayed pixel value.

Implements ImageProcessor.

Definition at line 113 of file FloatProcessor.java.

double getMin ( )
inlinevirtual

Returns the smallest displayed pixel value.

Implements ImageProcessor.

Definition at line 108 of file FloatProcessor.java.

int getPixel ( int  x,
int  y 
)
inlinevirtual

Returns a pixel value that must be converted using Float.intBitsToFloat().

Implements ImageProcessor.

Definition at line 198 of file FloatProcessor.java.

int [] getPixel ( int  x,
int  y,
int[]  iArray 
)
inline

Returns the value of the pixel at (x,y) in a one element int array. iArray is an optiona preallocated array.

Definition at line 208 of file FloatProcessor.java.

Object getPixels ( )
inlinevirtual

Returns a reference to the float array containing this image's pixel data.

Implements ImageProcessor.

Definition at line 256 of file FloatProcessor.java.

Object getPixelsCopy ( )
inlinevirtual

Returns a reference to this image's snapshot (undo) array. If the snapshot array is null, returns a copy of the pixel data. The array type varies depending on the image type.

Implements ImageProcessor.

Definition at line 260 of file FloatProcessor.java.

float getPixelValue ( int  x,
int  y 
)
inlinevirtual

Returns the value of the pixel at (x,y). For byte and short images, returns a calibrated value if a calibration table has been set using setCalibraionTable(). For RGB images, returns the luminance value.

Implements ImageProcessor.

Definition at line 241 of file FloatProcessor.java.

void medianFilter ( )
inlinevirtual

Not implemented.

Implements ImageProcessor.

Definition at line 749 of file FloatProcessor.java.

void noise ( double  range)
inlinevirtual

Adds random noise to the image or ROI.

Parameters
rangethe range of random numbers

Implements ImageProcessor.

Definition at line 567 of file FloatProcessor.java.

void putPixel ( int  x,
int  y,
int[]  iArray 
)
inline

Sets a pixel in the image using a one element int array.

Definition at line 215 of file FloatProcessor.java.

void putPixel ( int  x,
int  y,
int  value 
)
inlinevirtual

Stores the specified value at (x,y). The value is expected to be a float that has been converted to an int using Float.floatToIntBits().

Implements ImageProcessor.

Definition at line 230 of file FloatProcessor.java.

void putPixelValue ( int  x,
int  y,
double  value 
)
inlinevirtual

Stores the specified real value at (x,y).

Implements ImageProcessor.

Definition at line 236 of file FloatProcessor.java.

void reset ( )
inlinevirtual

Restores the pixel data from the snapshot (undo) buffer.

Implements ImageProcessor.

Definition at line 170 of file FloatProcessor.java.

void reset ( ImageProcessor  mask)
inlinevirtual

Restore pixels that are within roi but not part of the mask.

Implements ImageProcessor.

Definition at line 178 of file FloatProcessor.java.

void resetMinAndMax ( )
inline

Recalculates the min and max values used to scale pixel values to 0-255 for display. This ensures that this FloatProcessor is set up to correctly display the image.

Definition at line 101 of file FloatProcessor.java.

ImageProcessor resize ( int  dstWidth,
int  dstHeight 
)
inlinevirtual

Creates a new FloatProcessor containing a scaled copy of this image or selection.

Implements ImageProcessor.

Definition at line 669 of file FloatProcessor.java.

void rotate ( double  angle)
inlinevirtual

Rotates the image or ROI 'angle' degrees clockwise.

See Also
ImageProcessor::setInterpolate

Implements ImageProcessor.

Definition at line 505 of file FloatProcessor.java.

void scale ( double  xScale,
double  yScale 
)
inlinevirtual

Scales the image or selection using the specified scale factors.

See Also
ImageProcessor::setInterpolate

Implements ImageProcessor.

Definition at line 598 of file FloatProcessor.java.

void setColor ( Color  color)
inlinevirtual

Sets the foreground fill/draw color.

Implements ImageProcessor.

Definition at line 711 of file FloatProcessor.java.

void setMinAndMax ( double  min,
double  max 
)
inlinevirtual

Sets the min and max variables that control how real pixel values are mapped to 0-255 screen values. Use resetMinAndMax() to enable auto-scaling;

See Also
ij.plugin.frame.ContrastAdjuster

Implements ImageProcessor.

Definition at line 89 of file FloatProcessor.java.

void setPixels ( Object  pixels)
inlinevirtual

Sets a new pixel array for the image and resets the snapshot buffer. The length of the array must be equal to width*height.

Implements ImageProcessor.

Definition at line 270 of file FloatProcessor.java.

void setValue ( double  value)
inlinevirtual

Sets the default fill/draw value.

Implements ImageProcessor.

Definition at line 723 of file FloatProcessor.java.

void snapshot ( )
inlinevirtual

Makes a copy of this image's pixel data.

Implements ImageProcessor.

Definition at line 158 of file FloatProcessor.java.

void threshold ( int  level)
inlinevirtual

Not implemented.

Implements ImageProcessor.

Definition at line 745 of file FloatProcessor.java.


The documentation for this class was generated from the following file: