public abstract class ImageBase extends java.lang.Object implements java.lang.Comparable<ImageBase>
Constructor and Description |
---|
ImageBase() |
Modifier and Type | Method and Description |
---|---|
void |
applyCurve(java.util.List<java.awt.Point> points)
Apply a tone curve to all channels.
|
int |
compareTo(ImageBase other)
Compares _Ev values only.
|
static Image |
createImage(int width,
int height,
int nBands,
int nBits)
Utility for constructing an uninitialised image of suitable type for the
number of bits.
|
static Image |
createImage(int width,
int height,
int nBands,
int nBits,
boolean fillWithZeroes,
boolean compatibleWithDisplay)
Utility for constructing an image of suitable type for the number of
bits, optionally filled with zeroes.
|
abstract int |
getBitsPerChannel() |
Calibration |
getCalibration()
Get a reference to the Calibration object for this image.
|
double |
getEv()
Exposure value, 0 if not set and this is the case when an image is first
constructed: it is necessary to call setEv () to set the field.
|
java.lang.String |
getFilePath()
Get the path of the file from which this image was loaded or to which it
was last saved.
|
static java.awt.GraphicsConfiguration |
getGraphicsConfiguration()
Get a reference to the GraphicsConfiguration object, which is the default
one for the display system.
|
abstract int |
getHeight() |
Metadata |
getMetadata()
Get metadata associated with the image.
|
abstract int |
getNBands() |
abstract int[] |
getPixel(int x,
int y) |
abstract RangeInt |
getRange()
Get the minimum and maximum values occurring across all channels, as a
pair of int values.
|
abstract int |
getWidth() |
boolean |
pixelBrighter(double[] brightPixel,
double[] darkPixel)
Confirm whether brightPixel is truly brighter (in all bands) than darkPixel.
|
boolean |
pixelBrighter(int[] brightPixel,
int[] darkPixel)
Confirm whether brightPixel is truly brighter (in all bands) than darkPixel.
|
boolean |
pixelsDiffer(double[] px1,
double[] px2,
double threshold)
Determine whether 2 pixels differ by more than a given threshold value
in at least one band.
|
boolean |
pixelsDiffer(int[] px1,
int[] px2,
int threshold)
Determine whether 2 pixels differ by more than a given threshold value
in at least one band.
|
Image |
plotResponseCurve(java.util.List<Image> images)
Uses the images to compute the camera response curve and display it as a
graph, as described in "On Being ‘Undigital’ With
Digital Cameras: Extending Dynamic Range By Combining Differently Exposed
Pictures" by S.
|
static Image |
recombine(Image... images)
Make a multi-band image from an array of monochrome ones.
|
abstract void |
rotate(Angle angle)
Rotate the image anticlockwise by the given angle about its centre.
|
void |
rotate(double angleDegs)
Rotate the image anticlockwise by the given angle (in degrees)
about its centre.
|
Image |
rotate180()
Rotate the image by exactly 180 degrees - faster than the
more general method because it requires no pixel interpolation.
|
Image |
rotate270()
Rotate the image by exactly 90 degrees clockwise - faster than the
more general method because it requires no pixel interpolation.
|
Image |
rotate90()
Rotate the image by exactly 90 degrees anticlockwise - faster than the
more general method because it requires no pixel interpolation.
|
static boolean |
sameBitsAndBands(Image... images)
Check whether all the images have the same bit depth and number of
channels.
|
static boolean |
sameSizeBitsAndBands(Image... images)
Check whether all the images have the same width, height, bit depth and
number of channels.
|
void |
saturate(int amount)
Apply a given amount of saturation (arbitrary scale, -100 ..
|
void |
setCalibration(Calibration aCalib)
Associate a Calibration object with this image.
|
boolean |
setEv()
Try to set exposure value (private field _Ev) from metadata, as
1/f-number-squared x exposure (s) x ISO.
|
void |
setFilePath(java.lang.String filePath)
Record the path to the file in which the image was last saved.
|
void |
setMetadata(Metadata theData)
Associate metadata with the image.
|
abstract void |
setPixel(int x,
int y,
int[] px) |
protected abstract void |
setRange(RangeInt range) |
protected void |
showInfo(Image image)
Display information about the given image in a dialogue.
|
void |
swapQuadrants()
Rearrange the 4 quadrants of the image - useful for viewing Fourier
Transform results (in which case the image width and height are powers
of 2).
|
protected Metadata metadata
public Calibration getCalibration()
public void setCalibration(Calibration aCalib)
public java.lang.String getFilePath()
public void setFilePath(java.lang.String filePath)
public static java.awt.GraphicsConfiguration getGraphicsConfiguration()
public Metadata getMetadata()
public void setMetadata(Metadata theData)
public abstract int getWidth()
public abstract int getHeight()
public abstract int getNBands()
public abstract int getBitsPerChannel()
public abstract int[] getPixel(int x, int y)
public abstract void setPixel(int x, int y, int[] px)
public abstract RangeInt getRange()
protected abstract void setRange(RangeInt range)
public static Image createImage(int width, int height, int nBands, int nBits)
public static Image createImage(int width, int height, int nBands, int nBits, boolean fillWithZeroes, boolean compatibleWithDisplay)
public boolean pixelBrighter(int[] brightPixel, int[] darkPixel)
public boolean pixelBrighter(double[] brightPixel, double[] darkPixel)
public boolean pixelsDiffer(int[] px1, int[] px2, int threshold)
public boolean pixelsDiffer(double[] px1, double[] px2, double threshold)
public void applyCurve(java.util.List<java.awt.Point> points)
public void saturate(int amount)
public Image plotResponseCurve(java.util.List<Image> images)
public static Image recombine(Image... images)
public void rotate(double angleDegs)
public abstract void rotate(Angle angle)
public Image rotate180()
public Image rotate270()
public Image rotate90()
public static boolean sameBitsAndBands(Image... images)
public static boolean sameSizeBitsAndBands(Image... images)
protected void showInfo(Image image)
public void swapQuadrants()
public double getEv()
public boolean setEv()