DESY ACOP Beans Home

de.desy.acop.video.timageio
Class TImageMetadata

java.lang.Object
  extended by de.desy.acop.video.timageio.TImageMetadata

public class TImageMetadata
extends java.lang.Object

Represents metadata (non-image data) associated with TINE images.

Since:
October 2009
Author:
David Melkumyan, DESY Zeuthen

Field Summary
 java.lang.Integer aoiHeight
           
 java.lang.Integer aoiWidth
           
 java.lang.Integer appendedFrameSize
           
 java.lang.Integer bytesPerPixel
           
 java.lang.Long cameraPortId
           
 java.lang.String cameraPortName
           
 java.lang.String comment
          optional
 java.lang.Integer effectiveBitsPerPixel
           
 java.lang.Long eventNumber
           
 java.lang.Long frameNumber
           
 float fspare1
           
 float fspare2
           
 float fspare3
           
 java.lang.Integer horizontalBinning
           
 java.lang.Integer imageFlags
           
 ImageFormat imageFormat
           
 java.lang.Float imageRotation
           
 int ispare1
           
 int ispare2
           
 int ispare3
           
static java.lang.String KEY_AOI_HEIGHT
           
static java.lang.String KEY_AOI_WIDTH
           
static java.lang.String KEY_APPENDED_FRAME_SIZE
           
static java.lang.String KEY_BYTES_PER_PIXEL
           
static java.lang.String KEY_CAMERA_PORT_ID
           
static java.lang.String KEY_CAMERA_PORT_NAME
           
static java.lang.String KEY_COMMENT
           
static java.lang.String KEY_EFFECTIVE_BITS_PER_PIXEL
           
static java.lang.String KEY_EVENT_NUMBER
           
static java.lang.String KEY_FRAME_NUMBER
           
static java.lang.String KEY_FSPARE1
           
static java.lang.String KEY_FSPARE2
           
static java.lang.String KEY_FSPARE3
           
static java.lang.String KEY_HORIZONTAL_BINNING
           
static java.lang.String KEY_IMAGE_FLAGS
           
static java.lang.String KEY_IMAGE_FORMAT
           
static java.lang.String KEY_IMAGE_ROTATION
           
static java.lang.String KEY_ISPARE1
           
static java.lang.String KEY_ISPARE2
           
static java.lang.String KEY_ISPARE3
           
static java.lang.String KEY_MD5HASH
           
static java.lang.String KEY_OPT_TEXT
           
static java.lang.String KEY_SOFTWARE
           
static java.lang.String KEY_SOURCE_FORMAT
           
static java.lang.String KEY_SOURCE_HEIGHT
           
static java.lang.String KEY_SOURCE_WIDTH
           
static java.lang.String KEY_TIMESTAMP_MICROSECONDS
           
static java.lang.String KEY_TIMESTAMP_SECONDS
           
static java.lang.String KEY_VERSION_TAG
           
static java.lang.String KEY_VERTICAL_BINNING
           
static java.lang.String KEY_VTOB
           
static java.lang.String KEY_XSCALE
           
static java.lang.String KEY_XSTART
           
static java.lang.String KEY_YSCALE
           
static java.lang.String KEY_YSTART
           
 java.lang.String md5hash
          The md5 hash of image bits.
 java.util.Map<java.lang.String,java.lang.String> optVars
          Optional user text tags.
 java.lang.String software
          optional
 ImageFormat sourceFormat
           
 java.lang.Integer sourceHeight
           
 java.lang.Integer sourceWidth
           
 java.lang.Integer timestampMicroseconds
           
 java.lang.Integer timestampSeconds
           
 java.lang.Long versionTag
           
 java.lang.Integer verticalBinning
           
 java.lang.Float xScale
           
 java.lang.Integer xStart
           
 java.lang.Float yScale
           
 java.lang.Integer yStart
           
 
Constructor Summary
TImageMetadata(java.awt.image.BufferedImage bi)
          Constructs TImageMetadata from BufferedImage with TINE image metadata in hashtable
TImageMetadata(java.awt.image.BufferedImage bi, boolean rejectNonArchival)
           
TImageMetadata(javax.imageio.metadata.IIOMetadata iioMetadata)
          Creates image Metadata from known Image I/O Metadata.
TImageMetadata(de.desy.tine.types.IMAGE timage)
          Creates image Metadata from TINE image.
TImageMetadata(com.sun.imageio.plugins.png.PNGMetadata pngMetadata)
          Creates image Metadata from PNG Metadata.
 
Method Summary
 boolean isArchival()
          Return true if image metadata is archival (valid), otherwise false
static java.lang.String md5hash(byte[] data)
           
 com.sun.imageio.plugins.png.PNGMetadata toPngMetadata()
          Converts metadata to a PNG Metadata
 java.lang.String toString()
           
 void write(de.desy.tine.types.IMAGE ti)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_SOFTWARE

public static final java.lang.String KEY_SOFTWARE
See Also:
Constant Field Values

KEY_COMMENT

public static final java.lang.String KEY_COMMENT
See Also:
Constant Field Values

KEY_CAMERA_PORT_ID

public static final java.lang.String KEY_CAMERA_PORT_ID
See Also:
Constant Field Values

KEY_VERSION_TAG

public static final java.lang.String KEY_VERSION_TAG
See Also:
Constant Field Values

KEY_TIMESTAMP_SECONDS

public static final java.lang.String KEY_TIMESTAMP_SECONDS
See Also:
Constant Field Values

KEY_TIMESTAMP_MICROSECONDS

public static final java.lang.String KEY_TIMESTAMP_MICROSECONDS
See Also:
Constant Field Values

KEY_CAMERA_PORT_NAME

public static final java.lang.String KEY_CAMERA_PORT_NAME
See Also:
Constant Field Values

KEY_SOURCE_WIDTH

public static final java.lang.String KEY_SOURCE_WIDTH
See Also:
Constant Field Values

KEY_SOURCE_HEIGHT

public static final java.lang.String KEY_SOURCE_HEIGHT
See Also:
Constant Field Values

KEY_AOI_WIDTH

public static final java.lang.String KEY_AOI_WIDTH
See Also:
Constant Field Values

KEY_AOI_HEIGHT

public static final java.lang.String KEY_AOI_HEIGHT
See Also:
Constant Field Values

KEY_XSTART

public static final java.lang.String KEY_XSTART
See Also:
Constant Field Values

KEY_YSTART

public static final java.lang.String KEY_YSTART
See Also:
Constant Field Values

KEY_BYTES_PER_PIXEL

public static final java.lang.String KEY_BYTES_PER_PIXEL
See Also:
Constant Field Values

KEY_EFFECTIVE_BITS_PER_PIXEL

public static final java.lang.String KEY_EFFECTIVE_BITS_PER_PIXEL
See Also:
Constant Field Values

KEY_HORIZONTAL_BINNING

public static final java.lang.String KEY_HORIZONTAL_BINNING
See Also:
Constant Field Values

KEY_VERTICAL_BINNING

public static final java.lang.String KEY_VERTICAL_BINNING
See Also:
Constant Field Values

KEY_SOURCE_FORMAT

public static final java.lang.String KEY_SOURCE_FORMAT
See Also:
Constant Field Values

KEY_IMAGE_FORMAT

public static final java.lang.String KEY_IMAGE_FORMAT
See Also:
Constant Field Values

KEY_FRAME_NUMBER

public static final java.lang.String KEY_FRAME_NUMBER
See Also:
Constant Field Values

KEY_EVENT_NUMBER

public static final java.lang.String KEY_EVENT_NUMBER
See Also:
Constant Field Values

KEY_XSCALE

public static final java.lang.String KEY_XSCALE
See Also:
Constant Field Values

KEY_YSCALE

public static final java.lang.String KEY_YSCALE
See Also:
Constant Field Values

KEY_IMAGE_ROTATION

public static final java.lang.String KEY_IMAGE_ROTATION
See Also:
Constant Field Values

KEY_IMAGE_FLAGS

public static final java.lang.String KEY_IMAGE_FLAGS
See Also:
Constant Field Values

KEY_APPENDED_FRAME_SIZE

public static final java.lang.String KEY_APPENDED_FRAME_SIZE
See Also:
Constant Field Values

KEY_MD5HASH

public static final java.lang.String KEY_MD5HASH
See Also:
Constant Field Values

KEY_ISPARE1

public static final java.lang.String KEY_ISPARE1
See Also:
Constant Field Values

KEY_ISPARE2

public static final java.lang.String KEY_ISPARE2
See Also:
Constant Field Values

KEY_ISPARE3

public static final java.lang.String KEY_ISPARE3
See Also:
Constant Field Values

KEY_FSPARE1

public static final java.lang.String KEY_FSPARE1
See Also:
Constant Field Values

KEY_FSPARE2

public static final java.lang.String KEY_FSPARE2
See Also:
Constant Field Values

KEY_FSPARE3

public static final java.lang.String KEY_FSPARE3
See Also:
Constant Field Values

KEY_OPT_TEXT

public static final java.lang.String KEY_OPT_TEXT
See Also:
Constant Field Values

KEY_VTOB

public static final java.lang.String KEY_VTOB
See Also:
Constant Field Values

software

public java.lang.String software
optional


comment

public java.lang.String comment
optional


cameraPortId

public java.lang.Long cameraPortId
See Also:
de.desy.tine.types.TBufferedImage.SourceHeader#cameraPortId

versionTag

public java.lang.Long versionTag
See Also:
de.desy.tine.types.TBufferedImage.SourceHeader#versionTag

timestampSeconds

public java.lang.Integer timestampSeconds
See Also:
de.desy.tine.types.TBufferedImage.SourceHeader#timestampSeconds

timestampMicroseconds

public java.lang.Integer timestampMicroseconds
See Also:
de.desy.tine.types.TBufferedImage.SourceHeader#timestampMicroseconds

cameraPortName

public java.lang.String cameraPortName
See Also:
de.desy.tine.types.TBufferedImage.SourceHeader#cameraPortName

sourceWidth

public java.lang.Integer sourceWidth
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#sourceWidth

sourceHeight

public java.lang.Integer sourceHeight
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#sourceHeight

aoiWidth

public java.lang.Integer aoiWidth
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#aoiWidth

aoiHeight

public java.lang.Integer aoiHeight
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#aoiHeight

xStart

public java.lang.Integer xStart
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#xStart

yStart

public java.lang.Integer yStart
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#yStart

bytesPerPixel

public java.lang.Integer bytesPerPixel
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#bytesPerPixel

effectiveBitsPerPixel

public java.lang.Integer effectiveBitsPerPixel
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#effectiveBitsPerPixel

horizontalBinning

public java.lang.Integer horizontalBinning
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#horizontalBinning

verticalBinning

public java.lang.Integer verticalBinning
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#verticalBinning

sourceFormat

public ImageFormat sourceFormat
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#sourceFormat

imageFormat

public ImageFormat imageFormat
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#imageFormat

frameNumber

public java.lang.Long frameNumber
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#frameNumber

eventNumber

public java.lang.Long eventNumber
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#eventNumber

xScale

public java.lang.Float xScale
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#xScale

yScale

public java.lang.Float yScale
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#yScale

imageRotation

public java.lang.Float imageRotation
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#imageRotation

imageFlags

public java.lang.Integer imageFlags
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#imageFlags

appendedFrameSize

public java.lang.Integer appendedFrameSize
See Also:
de.desy.tine.types.TBufferedImage.FrameHeader#appendedFrameSize

md5hash

public java.lang.String md5hash
The md5 hash of image bits.

An md5 checksum (32 chars of text) is calculated out of the first 'appendedFrameSize' bytes found in TImage's appended frame buffer.


optVars

public java.util.Map<java.lang.String,java.lang.String> optVars
Optional user text tags.

The text tags are passed by the user as key value pairs, where each key and value must consist of only Latin1 characters (see PNG reference documentation on this subject).
The key must be smaller or equal to 64 characters in length.
Each key string is prefixed with "VSv3.opt.text." and then encoded to PNG tEXt chunk.


ispare1

public int ispare1

ispare2

public int ispare2

ispare3

public int ispare3

fspare1

public float fspare1

fspare2

public float fspare2

fspare3

public float fspare3
Constructor Detail

TImageMetadata

public TImageMetadata(java.awt.image.BufferedImage bi)
Constructs TImageMetadata from BufferedImage with TINE image metadata in hashtable

Parameters:
bi - - Java BufferedImage with TINE image metadata in hashtable

TImageMetadata

public TImageMetadata(java.awt.image.BufferedImage bi,
                      boolean rejectNonArchival)
Parameters:
bi - - BufferedImage
rejectNonArchival - - if true and bi contains invalid metadata throws IllegalArgumentException

TImageMetadata

public TImageMetadata(javax.imageio.metadata.IIOMetadata iioMetadata)
Creates image Metadata from known Image I/O Metadata.

Parameters:
iioMetadata - Image I/O Metadata
Throws:
java.lang.NullPointerException - If iioMetadata is null.
java.lang.NullPointerException - If iioMetadata is unsupported.

TImageMetadata

public TImageMetadata(com.sun.imageio.plugins.png.PNGMetadata pngMetadata)
Creates image Metadata from PNG Metadata.

Parameters:
pngMetadata - PNG Metadata

TImageMetadata

public TImageMetadata(de.desy.tine.types.IMAGE timage)
Creates image Metadata from TINE image.

Parameters:
timage - TINE Image
Method Detail

write

public void write(de.desy.tine.types.IMAGE ti)

toPngMetadata

public com.sun.imageio.plugins.png.PNGMetadata toPngMetadata()
Converts metadata to a PNG Metadata

Returns:
PNG Metadata

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

md5hash

public static java.lang.String md5hash(byte[] data)

isArchival

public boolean isArchival()
Return true if image metadata is archival (valid), otherwise false

Returns:
true if image metadata is archival (valid), otherwise false


Copyright © 2010. All Rights Reserved.