Subclass of second (and last) part of header (subclass used for logical grouping of class member variables which map almost 1:1 to header structures physically transferred in binary form. More...
Public Attributes | |
int | sourceWidth |
Width in pixels of the source image (if aoi is specified) or the raw appended image size. More... | |
int | sourceHeight |
Width in pixels of the source image (if aoi is specified) or the raw appended image size. More... | |
int | aoiWidth = -1 |
Width in pixels of the area of interest. More... | |
int | aoiHeight = -1 |
Height in pixels of the area of interest. More... | |
int | xStart = 0 |
Pixel index location (counting starts from zero) of left index from top-left position if an aoi is set. More... | |
int | yStart = 0 |
Pixel index location (counting starts from zero) of top index from top-left position if an aoi is set. More... | |
int | bytesPerPixel |
Specifies amount of bytes per pixel. More... | |
int | effectiveBitsPerPixel |
Specifies amount of effective bits per pixel of appended image bits. More... | |
int | horizontalBinning = 0 |
Pure informal value describes whether integer binning in horizontal direction was performed on the image. More... | |
int | verticalBinning = 0 |
Pure informal value describes whether integer binning in vertical direction was performed on the image. More... | |
int | sourceFormat |
Rather informal value declaring the image format taken by camera hardware at image source. More... | |
int | imageFormat |
Very important member declaring the binary format in which image bits, appended to this header taken by camera, are encoded. More... | |
long | frameNumber |
Specifies unique frame identification number. More... | |
long | eventNumber |
Specifies event number when frame was taken. More... | |
float | xScale = -1F |
Ratio between pixels and millimetres for x-pixel dimension. More... | |
float | yScale = -1F |
Ratio between pixels and millimetres for x-pixel dimension. More... | |
float | imageRotation = 0F |
Specifies the rotation balance (compare: account balance, saldo in German) that was applied since image acquire at source level. More... | |
float | fspare1 = -1F |
First out of three spare floats eserved for future extensions. More... | |
float | fspare2 = -1F |
Second out of three spare floats reserved for future extensions. More... | |
float | fspare3 = -1 |
Third out of three spare floats reserved for future extensions. More... | |
int | imageFlags = 0x1 |
Contains flags that describe boolean 'states' of an image. More... | |
int | ispare1 = -1 |
First out of three spare integers reserved for future extensions. More... | |
int | ispare2 = -1 |
Second out of three spare integers reserved for future extensions. More... | |
int | ispare3 = -1 |
Third out of three spare integers reserved for future extensions. More... | |
int | appendedFrameSize |
Contains number of bytes of 'image bits' data that follows the CF_IMAGE header. More... | |
Protected Member Functions | |
void | read (DataInputStream dis) throws IOException |
void | write (DataOutputStream ds) throws IOException |
Subclass of second (and last) part of header (subclass used for logical grouping of class member variables which map almost 1:1 to header structures physically transferred in binary form.
This class public member variables are mainly a clone of the TTF2_IMAGE_STRUCT defined and agreed in 2008 between ERS, MCS 1 and MCS 4.
|
protected |
dis |
|
IOException |
References de.desy.tine.types.IMAGE.FrameHeader.aoiHeight, de.desy.tine.types.IMAGE.FrameHeader.aoiWidth, de.desy.tine.types.IMAGE.FrameHeader.appendedFrameSize, de.desy.tine.types.IMAGE.FrameHeader.bytesPerPixel, de.desy.tine.types.IMAGE.FrameHeader.effectiveBitsPerPixel, de.desy.tine.types.IMAGE.FrameHeader.eventNumber, de.desy.tine.types.IMAGE.FrameHeader.frameNumber, de.desy.tine.types.IMAGE.FrameHeader.fspare1, de.desy.tine.types.IMAGE.FrameHeader.fspare2, de.desy.tine.types.IMAGE.FrameHeader.fspare3, de.desy.tine.types.IMAGE.FrameHeader.horizontalBinning, de.desy.tine.types.IMAGE.FrameHeader.imageFlags, de.desy.tine.types.IMAGE.FrameHeader.imageFormat, de.desy.tine.types.IMAGE.FrameHeader.imageRotation, de.desy.tine.types.IMAGE.FrameHeader.ispare1, de.desy.tine.types.IMAGE.FrameHeader.ispare2, de.desy.tine.types.IMAGE.FrameHeader.ispare3, de.desy.tine.types.IMAGE.FrameHeader.sourceFormat, de.desy.tine.types.IMAGE.FrameHeader.sourceHeight, de.desy.tine.types.IMAGE.FrameHeader.sourceWidth, de.desy.tine.dataUtils.UnsignedUtils.toUnsignedInt(), de.desy.tine.types.IMAGE.FrameHeader.verticalBinning, de.desy.tine.types.IMAGE.FrameHeader.xScale, de.desy.tine.types.IMAGE.FrameHeader.xStart, de.desy.tine.types.IMAGE.FrameHeader.yScale, and de.desy.tine.types.IMAGE.FrameHeader.yStart.
|
protected |
ds |
|
IOException |
References de.desy.tine.types.IMAGE.FrameHeader.aoiHeight, de.desy.tine.types.IMAGE.FrameHeader.aoiWidth, de.desy.tine.types.IMAGE.FrameHeader.appendedFrameSize, de.desy.tine.types.IMAGE.FrameHeader.bytesPerPixel, de.desy.tine.types.IMAGE.FrameHeader.effectiveBitsPerPixel, de.desy.tine.types.IMAGE.FrameHeader.eventNumber, de.desy.tine.types.IMAGE.FrameHeader.frameNumber, de.desy.tine.types.IMAGE.FrameHeader.fspare1, de.desy.tine.types.IMAGE.FrameHeader.fspare2, de.desy.tine.types.IMAGE.FrameHeader.fspare3, de.desy.tine.types.IMAGE.FrameHeader.horizontalBinning, de.desy.tine.types.IMAGE.FrameHeader.imageFlags, de.desy.tine.types.IMAGE.FrameHeader.imageFormat, de.desy.tine.types.IMAGE.FrameHeader.imageRotation, de.desy.tine.types.IMAGE.FrameHeader.ispare1, de.desy.tine.types.IMAGE.FrameHeader.ispare2, de.desy.tine.types.IMAGE.FrameHeader.ispare3, de.desy.tine.types.IMAGE.FrameHeader.sourceFormat, de.desy.tine.types.IMAGE.FrameHeader.sourceHeight, de.desy.tine.types.IMAGE.FrameHeader.sourceWidth, de.desy.tine.types.IMAGE.FrameHeader.verticalBinning, de.desy.tine.types.IMAGE.FrameHeader.xScale, de.desy.tine.types.IMAGE.FrameHeader.xStart, de.desy.tine.types.IMAGE.FrameHeader.yScale, and de.desy.tine.types.IMAGE.FrameHeader.yStart.
int de.desy.tine.types.IMAGE.FrameHeader.aoiHeight = -1 |
Height in pixels of the area of interest.
A special mechanism is implemented in a CF_IMAGE. If at the image source it can be decided that only a part of the sensor is read out or contains significant information (invaluable surroundings (mounting plates etc.) does not need to get transferred to remote peers), not the whole image may be transferred but only a rectangular region out of it. Even this rectangular piece is break down into two pieces: horizontal truncation (sourceWidth, aoiWidth and xStart) and vertical truncation (sourceHeight, aoiHeight and yStart).
If aoiHeight is specified (bigger than zero), it defines the number of vertical pixels that are attached to the header as frame. The sourceHeight member in that case should be bigger than aoiHeight and defines the source width in pixels (at source level) before an aoi was cut out. The whole mechanism is referred to sometimes as 'aoi cutout'.
If aoiHeight is set to a value of 0 or less, it is treated as NOT set. If yStart is bigger than zero the aoi is considered to be set in horizontal dimension. If aoiHeight is zero or less in that case, the header is considered to be NOT valid!
In C/C++ world, this member variable is a signed int32. If it is unset (very possible), value is less than or equal to zero. A recommendation for unset value is '-1', though.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.aoiWidth = -1 |
Width in pixels of the area of interest.
A special mechanism is implemented in a CF_IMAGE. If at the image source it can be decided that only a part of the sensor is read out or contains significant information (invaluable surroundings (mounting plates etc.) does not need to get transferred to remote peers), not the whole image may be transferred but only a rectangular region out of it. Even this rectangular piece is break down into two pieces: horizontal truncation (sourceWidth, aoiWidth and xStart) and vertical truncation (sourceHeight, aoiHeight and yStart).
If aoiWidth is specified (bigger than zero), it defines the number of horizontal pixels that are attached to the header as frame. The sourceWidth member in that case should be bigger than aoiWidth and defines the source width in pixels (at source level) before an aoi was cut out. The whole mechanism is referred to sometimes as 'aoi cutout'.
If aoiWidth is set to a value of 0 or less, it is treated as NOT set. If xStart is bigger than zero the aoi is considered to be set in horizontal dimension. If aoiWidth is zero or less in that case, the header is considered to be NOT valid!
In C/C++ world, this member variable is a signed int32. If it is unset (very possible), value is less than or equal to zero. A recommendation for unset value is '-1', though.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.appendedFrameSize |
Contains number of bytes of 'image bits' data that follows the CF_IMAGE header.
A value of -1 means that the member is not yet initialized. A value of 0 means that no bytes are appended at all. A positive integer value is equal to the number of bytes that are appended. A value of less than -1 is treated as invalid!
In C/C++ world, this member is a signed 32 bit integer.
Referenced by de.desy.tine.queryUtils.TQuery.getDeviceServerReport(), de.desy.tine.dataUtils.TDataType.putData(), de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.bytesPerPixel |
Specifies amount of bytes per pixel.
Currently defined values are 1 (exactly one byte per pixel), 2 (exactly two bytes per pixel), 3 (three bytes per pixel) and 4 (four bytes per pixel). Fractional bytes per pixel (as with packed 12 bit grayscale values) are not supported at the moment. It is foreseen to use the '0' to specify that.
Generally speaking, header version 1 supports raw grayscale images of 1,2 and 3 bytes per pixel and raw RGB colour images of 3 or 4 bytes per pixel (24 bits or 24 bits padded to 32 bits).
In C/C++ world, this member variable is a signed int32. If it is unset (unlikely), value must be '-1'. Values of less than one or bigger than four are treated as illegal for header version 1.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.effectiveBitsPerPixel |
Specifies amount of effective bits per pixel of appended image bits.
For performance reasons, physical resolution of 12 bits per pixel (in example Prosilica GE / GC-type monochrome cameras) is wrapped into 16 bit integers for improving handling by computers. For such scheme effective bits per pixel value was invented to distinguish valid from invalid pixel values and to have more input for image processing algorithms. The value should be set appropriate. If it is not set, it is believed to be set to the maximum value the current data format is capable of. If the value is bigger than theoretically possible for a given bytesPerPixel member, the header is considered to be invalid.
In C/C++ world, this member variable is a signed int32. If it is unset (unlikely), value must be '-1'. A value of zero is treated as 'unset' for header version 1.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
long de.desy.tine.types.IMAGE.FrameHeader.eventNumber |
Specifies event number when frame was taken.
In some modern timing systems, together with the main repetition rate (triggered accelerator like PITZ) an information is modulated on the trigger signal and properly decoded to computer registers by timing hardware. This information can be helpful in joining or synchronization cases. One use-case is DAQ correlation ("where did the lightning hit first before a lot of systems went crazy").
The header members eventNumber, frameNumber, timeStamp and cameraPortId build up a primary key which should identify an image throughout a whole facility for the lifetime of the facility.
In C/C++ world, this member variable is an unsigned int32. If it is unset, value must be '0'. Any positive value is considered a valid event number and usually event number are incremented like frame numbers, but for each event instead of each subsequent frame.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
long de.desy.tine.types.IMAGE.FrameHeader.frameNumber |
Specifies unique frame identification number.
This number is not really unique. Starting at one, for each frame (as early as possible after acquiring, maybe even done inside camera hardware) the image is tagged with this number. The next image (no losses in between!) should be tagged with number+1 and so on. By performing this method, it can be checked later whether a sequence contains really subsequent frames as they were acquired at source level and no video frame is lost in between.
In C/C++ world, this member variable is an unsigned int32. If it is unset, value must be '0'.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.fspare1 = -1F |
First out of three spare floats eserved for future extensions.
Current value of this float should be '-1.0' (uninitialized). In
C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.fspare2 = -1F |
Second out of three spare floats reserved for future extensions.
Current value of this float should be '-1.0' (uninitialized). In
C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.fspare3 = -1 |
Third out of three spare floats reserved for future extensions.
Current value of this float should be '-1.0' (uninitialized). In
C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.horizontalBinning = 0 |
Pure informal value describes whether integer binning in horizontal direction was performed on the image.
It is not said whether this binning was performed by hardware or software.
In C/C++ world, this member variable is a signed int32. If it is unset (very likely), value must be '0'. If value is less than zero header is considered invalid.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.imageFlags = 0x1 |
Contains flags that describe boolean 'states' of an image.
Each state is encoded into one bit. Up to now, four bits are already used (LSB 1, MSB 32):
In C/C++ world, this member is a standard 32 bit signed integer.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.imageFormat |
Very important member declaring the binary format in which image bits, appended to this header taken by camera, are encoded.
In general, its value can be very different from sourceFormat value. It should always reflect encoding type of image bits. Various formats can be set:
In C/C++ world, this member variable is a signed int32. If it is unset (very unlikely), value must be '-1'. If value is less than -1, header is considered invalid.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.imageRotation = 0F |
Specifies the rotation balance (compare: account balance, saldo in German) that was applied since image acquire at source level.
For example lossless orientation changes can be performed in CoreProvider TINE Server video component to undo perspective changes introduced because of awkward or improper mounting of camera hardware at readout position. This member is always initialized to 0.0 (no rotation performed). Positive values specify clockwise rotation, negative values specify counterclockwise rotation. Regarding value of this field, a general agreement is to keep it in range of -360.0 < imageRotation < 360.0 .
In C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.ispare1 = -1 |
First out of three spare integers reserved for future extensions.
Current value should be '-1' (uninitialized).
In C/C++ world, this member is a signed 32 bit integer.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.ispare2 = -1 |
Second out of three spare integers reserved for future extensions.
Current value should be '-1' (uninitialized).
In C/C++ world, this member is a signed 32 bit integer.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.ispare3 = -1 |
Third out of three spare integers reserved for future extensions.
Current value should be '-1' (uninitialized).
In C/C++ world, this member is a signed 32 bit integer.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.sourceFormat |
Rather informal value declaring the image format taken by camera hardware at image source.
Once set at image acquire level, this member should not be changed. One practical case is that colour information was originally delivered by sensor as bayer pattern but decoded by image acquire software to 24 bit RGB data, which was subsequently be appended to this image header. The image source format should be bayer in that case. Certain formats are implemented at the moment, see imageFormat.
In C/C++ world, this member variable is a signed int32. If it is unset (unlikely), value must be '-1'. If value is less than -1, header is considered invalid.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.sourceHeight |
Width in pixels of the source image (if aoi is specified) or the raw appended image size.
The variable is unnecessary if an aoi is set and very necessary otherwise. See aoiWidth, aoiHeight, xStart, yStart and sourceHeight.
In C/C++ world, this member variable is a signed int32. If it is unset (unlikely, but possible), value is '-1'.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.sourceWidth |
Width in pixels of the source image (if aoi is specified) or the raw appended image size.
The variable is unnecessary if an aoi is set and very necessary otherwise. See aoiWidth, aoiHeight, xStart, yStart and sourceWidth.
In C/C++ world, this member variable is a signed int32. If it is unset (unlikely, but possible), value is '-1'.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.verticalBinning = 0 |
Pure informal value describes whether integer binning in vertical direction was performed on the image.
It is not said whether this binning was performed by hardware or software.
In C/C++ world, this member variable is a signed int32. If it is unset (very likely), value must be '0'. If value is less than zero, header is considered invalid.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.xScale = -1F |
Ratio between pixels and millimetres for x-pixel dimension.
If xScale is 3.0, one pixel is 3 mm "wide". If unset or unspecified, value must be set to ~ -1.0. Any negative value except ~ -1.0 is treated as faulty. A value of ~ 0.0 is considered to be illegal.
In C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.xStart = 0 |
Pixel index location (counting starts from zero) of left index from top-left position if an aoi is set.
If no aoi is set (here: aoiWidth <= 0); xStart is defined to be exactly zero. If it is not, the header is invalid. xStart plus aoiWidth must be less than or equal to sourceWidth. In C/C++ world, this member variable is a signed int32. If it is unset (very possible), value must be zero. A value of less than zero is invalid!
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
float de.desy.tine.types.IMAGE.FrameHeader.yScale = -1F |
Ratio between pixels and millimetres for x-pixel dimension.
If yScale is 2.0, one pixel is 2 mm "tall". If unset or unspecified, value must be set to ~ -1.0. Any negative value except ~ -1.0 is treated as faulty. A value of ~ 0.0 is considered to be illegal.
In C/C++ world, this member is a standard 32 bit floating point number.
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().
int de.desy.tine.types.IMAGE.FrameHeader.yStart = 0 |
Pixel index location (counting starts from zero) of top index from top-left position if an aoi is set.
If no aoi is set (here: aoiHeight <= 0); xStart is defined to be exactly zero. If it is not, the header is invalid. yStart plus aoiHeight must be less than or equal to sourceHeight. In C/C++ world, this member variable is a signed int32. If it is unset (very possible), value must be zero. A value of less than zero is invalid!
Referenced by de.desy.tine.types.IMAGE.FrameHeader.read(), and de.desy.tine.types.IMAGE.FrameHeader.write().