public class PivImg
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MIN
Determine minimal pixel grey values for a series of images.
|
static int |
R00064
Normalization between 0 and 64 counts grey value (bandwidth 256 counts).
|
static int |
R00128
Normalization between 0 and 128 counts grey value (bandwidth 256 counts).
|
static int |
R00256
Normalization between 0 and 256 counts grey value (bandwidth 256 counts).
|
static int |
R00512
Normalization between 0 and 512 counts grey value (bandwidth 256 counts).
|
static int |
R01024
Normalization between 0 and 1024 counts grey value (bandwidth 256
counts).
|
static int |
R02048
Normalization between 0 and 2048 counts grey value (bandwidth 256
counts).
|
static int |
R04096
Normalization between 0 and 4096 counts grey value (bandwidth 256
counts).
|
static int |
R08192
Normalization between 0 and 8192 counts grey value (bandwidth 256
counts).
|
static int |
R16384
Normalization between 0 and 16384 counts grey value (bandwidth 256
counts).
|
static int |
R32768
Normalization between 0 and 32768 counts grey value (bandwidth 256
counts).
|
static int |
R65536
Normalization between 0 and 65536 counts grey value (bandwidth 256
counts).
|
static int |
RM_SLIDING_BACKGRD
Subtract the minimum of a series of images from an image.
|
static int |
RMIN_MAX
Normalization between minimum and maximum grey value (bandwidth 256
pixels).
|
static int |
SUM
Sum up the pixel grey values for a series of images.
|
Constructor and Description |
---|
PivImg(JPiv jpiv,
java.lang.String pathname)
Creates a new instance of PivImg.
|
PivImg(JPiv jpiv,
java.lang.String[] filelist,
int op)
Creates a new instance of PivImg by applying an operation to a file list.
|
PivImg(JPiv jpiv,
java.lang.String pathnameA,
java.lang.String pathnameB)
Creates a new instance of PivImg by combining two single image files to a
double frame image.
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
getAsBufferedImage()
Get the image as a BufferedImage.
|
javax.media.jai.PlanarImage |
getAsPlanarImage()
Get the image as a PlanarImage.
|
javax.media.jai.PlanarImage |
getAsPlanarImageByte(int range,
float zoom)
Get the image as a PlanarImage of 8 bit greyscale resolution.
|
javax.media.jai.PlanarImage |
getAsPlanarImageFloat()
Get the image as a PlanarImage TYPE_FLOAT.
|
float[][] |
getDataFloat(int x,
int y,
int w,
int h,
int frame)
Returns the pixels for a specified rectangle in a float array, one
greyvalue per array element.
|
java.lang.String |
getFilename()
Get the filename of this image.
|
int |
getHeight()
Get height of the image.
|
float |
getIntensityAt(int x,
int y)
Get the greyvalue at a certain position.
|
javax.media.jai.PlanarImage |
getSubImage(float x,
float y,
int dx,
int dy,
float xShear,
float yShear,
int frame)
Get a region of the image.
|
javax.media.jai.PlanarImage |
getSubImage(float x,
float y,
int dx,
int dy,
int frame)
Get a region of the image (interpolated).
|
javax.media.jai.PlanarImage |
getSubImage(int x,
int y,
int dx,
int dy,
int frame)
Get a region of the image
|
int |
getWidth()
Get the widht of the image.
|
void |
normalize(float dynRange)
Normalize the image.
|
void |
writePivImageToFile(java.lang.String format,
java.lang.String filename)
Export the image.
|
public static final int R00064
public static final int R00128
public static final int R00256
public static final int R00512
public static final int R01024
public static final int R02048
public static final int R04096
public static final int R08192
public static final int R16384
public static final int R32768
public static final int R65536
public static final int RMIN_MAX
public static final int MIN
public static final int SUM
public static final int RM_SLIDING_BACKGRD
public PivImg(JPiv jpiv, java.lang.String pathname)
jpiv
- The parent component.pathname
- The complete pathname of a pixel image.public PivImg(JPiv jpiv, java.lang.String pathnameA, java.lang.String pathnameB)
jpiv
- The parent component.pathnameA
- The complete pathname of the upper pixel image.pathnameB
- The complete pathname of the lower pixel image.public PivImg(JPiv jpiv, java.lang.String[] filelist, int op)
jpiv
- The parent component.filelist
- A list of pixel image pathnames.op
- Either PivImg.MIN, PivImg.SUM, or PivImg.RM_SLIDING_BACKGRD.public java.lang.String getFilename()
public java.awt.image.BufferedImage getAsBufferedImage()
public javax.media.jai.PlanarImage getAsPlanarImage()
public javax.media.jai.PlanarImage getAsPlanarImageFloat()
public javax.media.jai.PlanarImage getAsPlanarImageByte(int range, float zoom)
zoom
- The magnification factor of the image.range
- The image is normalized on this greyscale band. Possible
values are defined by the following constants: public float getIntensityAt(int x, int y)
x
- The x coordinate (zero top left).y
- The y coordinate (zero top left).public void normalize(float dynRange)
dynRange
- The maximum value of the normalized image.public int getWidth()
public int getHeight()
public float[][] getDataFloat(int x, int y, int w, int h, int frame)
x
- The x-coordinate of the upper-left pixel location.y
- The y-coordinate of the upper-left pixel location.w
- Width of the pixel rectangle.h
- Height of the pixel rectangle.frame
- Specifies the first or second frame in case of a double frame
image.public javax.media.jai.PlanarImage getSubImage(int x, int y, int dx, int dy, int frame) throws java.lang.IllegalArgumentException
x
- Horizontal origin of the sub-image.y
- Vertical origin of the sub-image.dx
- Width of the sub-image.dy
- Height of the sub-image.frame
- First frame (0) or second frame (1).java.lang.IllegalArgumentException
- if the region specified is outside the image.public javax.media.jai.PlanarImage getSubImage(float x, float y, int dx, int dy, int frame) throws java.lang.IllegalArgumentException
x
- Horizontal origin of the sub-image.y
- Vertical origin of the sub-image.dx
- Width of the sub-image.dy
- Height of the sub-image.frame
- First frame (0) or second frame (1).java.lang.IllegalArgumentException
- if the region specified is outside the image.public javax.media.jai.PlanarImage getSubImage(float x, float y, int dx, int dy, float xShear, float yShear, int frame) throws java.lang.IllegalArgumentException
x
- Horizontal origin of the sub-image.y
- Vertical origin of the sub-image.dx
- Width of the sub-image.dy
- Height of the sub-image.frame
- First frame (0) or second frame (1).xShear
- Horizontal shear value (which is basically the tangens of the
shear-angle).yShear
- Vertical shear value.java.lang.IllegalArgumentException
- if the region specified is outside the image.public void writePivImageToFile(java.lang.String format, java.lang.String filename)
format
- One of the supported format strings like 'png', 'jpg', 'tif'
etc.filename
- Complete destination path.