|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpiv2.PivImg
public class PivImg
A double frame pixel image representation. This class provides methods for reading, writing and processing double frame pixel images. The pixel data is always converted to float, regardless of the original data type. This is at cost of performance, but it guarantees high accuracy and decreases the danger of data overflow while keeping the code clean and transparent.
| Field Summary | |
|---|---|
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 |
RMIN_MAX
Normalization between minimum and maximum grey value (bandwidth 256 pixels). |
| Constructor Summary | |
|---|---|
PivImg(JPiv jpiv,
java.lang.String pathname)
Creates a new instance of PivImg. |
|
PivImg(JPiv jpiv,
java.lang.String[] filelist,
java.lang.String pathname)
Creates a new instance o PivImg by summing up a number of images. |
|
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. |
|
| Method Summary | |
|---|---|
java.awt.image.BufferedImage |
getAsBufferedImage()
Get the image as a BufferedImage. |
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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,
java.lang.String pathname)
jpiv - The parent component.filelist - A list of pixel image pathnames.pathname - Destination path for the new image.| Method Detail |
|---|
public java.lang.String getFilename()
public java.awt.image.BufferedImage getAsBufferedImage()
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||