T
- Specifies the array type of the image. Typically either byte[], short[], or int[].public final class ImageEvent<T>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
ImageEvent<T> |
clone() |
static <T> ImageEvent<T> |
createImage(T imageData,
int width,
int height)
Creates a new image with the given image data and meta information.
|
static <T> ImageEvent<T> |
createImage(T imageData,
int width,
int height,
int bitDepth)
Creates a new image with the given image data and meta information.
|
boolean |
equals(java.lang.Object obj) |
int |
getBands()
Returns the number of bands (colors in image).
|
int |
getBitDepth()
Returns the bit dept.
|
int |
getBytesPerPixel()
Returns the number of bytes used to store each pixel.
|
java.lang.String |
getCamera()
Returns the name of the camera which took the image.
|
java.lang.String |
getChannel()
Returns the channel in which the image was made.
|
java.lang.String |
getChannelGroup()
Returns the channel group in which the image was made.
|
long |
getCreationTime()
Returns the time milliseconds since January 1, 1970, 00:00:00 GMT when the image was created (see
Date.Date(long) ). |
ExecutionInformation |
getExecutionInformation()
Returns the information of how often the image producing job was already executed when producing the image.
|
int |
getHeight()
Returns image height in pixels.
|
T |
getImageData()
Returns the pixel data as an array of primitive types (typically byte or short).
|
java.lang.Class<?> |
getImageDataArrayType()
Returns the class of the array in which the image data is stored.
|
java.lang.Class<?> |
getImageDataType()
Returns the class of the primitive type in which one pixel of the image data is stored.
|
long |
getMaxIntensity()
Returns the maximal intensity a pixel can have.
|
PositionInformation |
getPositionInformation()
Returns the information about the logical position this image was made in.
|
int |
getWidth()
Returns image width in pixels.
|
int |
hashCode() |
boolean |
isSwitchXY()
Returns if the x and the y direction should be switched for images made by this camera.
|
boolean |
isTransposeX()
Returns if the x-direction of images made by this camera should be transposed.
|
boolean |
isTransposeY()
Returns if the if the y-direction of images made by this camera should be transposed.
|
void |
setBands(int bands)
Sets the number of bands (colors in image).
|
void |
setCamera(java.lang.String camera)
Set the name of the camera with which the image was taken.
|
void |
setChannel(java.lang.String channel)
Sets the channel in which the image was made.
|
void |
setChannelGroup(java.lang.String channelGroup)
Sets the channel group in which the image was made.
|
void |
setCreationTime(long creationTime)
Sets the time milliseconds since January 1, 1970, 00:00:00 GMT when the image was created (see
Date.getTime() ). |
void |
setExecutionInformation(ExecutionInformation executionInformation)
Sets the information of how often the image producing job was already executed when producing the image.
|
void |
setPositionInformation(PositionInformation positionInformation)
Sets the information about the logical position this image was made in.
|
void |
setSwitchXY(boolean switchXY)
Sets if the x and the y direction should be switched for images made by this camera.
|
void |
setTransposeX(boolean transpose)
Sets if the x-direction of images made by this camera should be transposed.
|
void |
setTransposeY(boolean transpose)
Sets if the y-direction of images made by this camera should be transposed.
|
public java.lang.Class<?> getImageDataArrayType()
public java.lang.Class<?> getImageDataType()
public static <T> ImageEvent<T> createImage(T imageData, int width, int height, int bitDepth) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
imageData
- Array of bytes, shorts or ints representing the pixel intensities, either of grayscale images or of several bands (colors) or color images.width
- The width of the image in pixels.height
- The height of the image in pixels.bitDepth
- The bit depth of the image.java.lang.NullPointerException
- Thrown if imageData is null.java.lang.IllegalArgumentException
- Thrown if type of image data is not supported by YouScope, or if number of pixels in imageData is not in agreement of claimed width and height of the image.public static <T> ImageEvent<T> createImage(T imageData, int width, int height) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
imageData
- Array of bytes, shorts or ints representing the pixel intensities, either of grayscale images or of several bands (colors) or color images.width
- The width of the image in pixels.height
- The height of the image in pixels.java.lang.NullPointerException
- Thrown if imageData is null.java.lang.IllegalArgumentException
- Thrown if type of image data is not supported by YouScope, or if number of pixels in imageData is not in agreement of claimed width and height of the image.public void setTransposeX(boolean transpose)
transpose
- True, if the x-direction should be transposed.public void setTransposeY(boolean transpose)
transpose
- True, if the y-direction should be transposedpublic void setSwitchXY(boolean switchXY)
switchXY
- True, if the x and y direction should be switched.public boolean isTransposeX()
public boolean isTransposeY()
public boolean isSwitchXY()
public int getBands()
public void setBands(int bands)
bands
- Number of bands.public T getImageData()
public int getWidth()
public int getHeight()
public int getBytesPerPixel()
public int getBitDepth()
getBytesPerPixel()
*8. For example, 12bit/pixel images are typically
stored in 2 bytes/pixel, which would allow for up to 16bit depth. However, 12bit pixels typically only use the lower 12bit of the 16bit available
in two bytes.public long getMaxIntensity()
getBitDepth()
)-1.
Note that getImageData()
returns unsigned values.public void setExecutionInformation(ExecutionInformation executionInformation)
executionInformation
- Information about producing job's evaluation times, or null.public ExecutionInformation getExecutionInformation()
public void setPositionInformation(PositionInformation positionInformation)
positionInformation
- Logical description of position, or null.public PositionInformation getPositionInformation()
public void setCreationTime(long creationTime)
Date.getTime()
).creationTime
- The time when image was created.public long getCreationTime()
Date.Date(long)
).public void setCamera(java.lang.String camera)
camera
- the name of the camera which took the image.public java.lang.String getCamera()
public void setChannelGroup(java.lang.String channelGroup)
setChannel(String)
, this identifies the channel the image was taken in.channelGroup
- the channel group the image was taken in.public java.lang.String getChannelGroup()
getChannel()
, this identifies the channel the image was taken in.public void setChannel(java.lang.String channel)
setChannelGroup(String)
, this identifies the channel the image was taken in.channel
- the channel the image was taken in.public java.lang.String getChannel()
getChannelGroup()
, this identifies the channel the image was taken in.public ImageEvent<T> clone()
clone
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object