Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
de.desy.tine.types.IMAGE.SourceHeader Class Reference

Subclass of first part of header (subclass used for logical grouping of class member variables which map almost 1:1 to header structures transferred in binary form. More...

Inherits Cloneable.

Public Member Functions

void setTotalLength (long lengthInBytes)
 Sets the totalLength member. More...
 
void setTimeStamp (long time)
 Sets the timestamp member variables (UTC seconds and microseconds). More...
 
void setStaticValues (int baseId, long specId, long version, String cameraPort)
 

Public Attributes

int baseTag = DEFAULT_BASE_TAG
 Magic ID in front of binary data block. More...
 
long cameraPortId = DEFAULT_CAMERA_PORT_ID
 Unique ID that identifies one single location of image creation, usually named Image Source in VSV3. More...
 
long versionTag = IMAGE_INITIAL_VERSION
 Defines the version of the IMAGE header. More...
 
long totalLength
 Contains the whole length of the data block as it would be transferred bytewise on network level. More...
 
int timestampSeconds
 Contains the time the image was originally taken at image source, UTC seconds part. More...
 
int timestampMicroseconds
 Contains the time the image was originally taken at image source, microseconds offset to UTC time. More...
 
String cameraPortName = DEFAULT_CAMERA_PORT_NAME
 < image timestamp (micro seconds) More...
 

Protected Member Functions

void read (DataInputStream dis) throws IOException
 Reads the SourceHeader from the supplied DataInputStream. More...
 
void write (DataOutputStream ds) throws IOException
 

Detailed Description

Subclass of first part of header (subclass used for logical grouping of class member variables which map almost 1:1 to header structures transferred in binary form.

Member Function Documentation

◆ read()

void de.desy.tine.types.IMAGE.SourceHeader.read ( DataInputStream  dis) throws IOException
protected

◆ setStaticValues()

void de.desy.tine.types.IMAGE.SourceHeader.setStaticValues ( int  baseId,
long  specId,
long  version,
String  cameraPort 
)

◆ setTimeStamp()

void de.desy.tine.types.IMAGE.SourceHeader.setTimeStamp ( long  time)

Sets the timestamp member variables (UTC seconds and microseconds).

This function never fails.

Parameters
timeContains UTC time*1000 plus fractional millisecond offset*1000.
See also
timestampSeconds
timestampMicroseconds

References de.desy.tine.types.IMAGE.SourceHeader.timestampMicroseconds, and de.desy.tine.types.IMAGE.SourceHeader.timestampSeconds.

◆ setTotalLength()

void de.desy.tine.types.IMAGE.SourceHeader.setTotalLength ( long  lengthInBytes)

Sets the totalLength member.

This function never fails.

Parameters
lengthInBytes
  • passed totalLength value
Deprecated:
mdavid: totalLength declared as public
See also
totalLength

References de.desy.tine.types.IMAGE.SourceHeader.totalLength.

◆ write()

void de.desy.tine.types.IMAGE.SourceHeader.write ( DataOutputStream  ds) throws IOException
protected

Member Data Documentation

◆ baseTag

int de.desy.tine.types.IMAGE.SourceHeader.baseTag = DEFAULT_BASE_TAG

Magic ID in front of binary data block.

Value is fixed to four character code 'VSV3' (little endian: 33565356 hex). VSV3 stands for VideoSystem Version 3.

In C/C++ world, member is an unsigned int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ cameraPortId

long de.desy.tine.types.IMAGE.SourceHeader.cameraPortId = DEFAULT_CAMERA_PORT_ID

Unique ID that identifies one single location of image creation, usually named Image Source in VSV3.

There must not be two image sources sharing the same camera port Id. If cameraPortId is set to 0 it means that no camera port id is attached to the image buffer so Image Source (origin of image) is undefined.

In C/C++ world, member is an unsigned int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ cameraPortName

String de.desy.tine.types.IMAGE.SourceHeader.cameraPortName = DEFAULT_CAMERA_PORT_NAME

< image timestamp (micro seconds)

A human-readable string giving imaginative representation of image source. Image source here does not only mean Image Source in VSv3 terms (position of image acquire location), but might also contain a string describing file name where the image was taken from (if loaded).

In C/C++ world, this header member is a 64 char array (64 bytes). It may not contain a null byte at the end, but 64 truly useful characters!

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), de.desy.tine.types.IMAGE.SourceHeader.setStaticValues(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ timestampMicroseconds

int de.desy.tine.types.IMAGE.SourceHeader.timestampMicroseconds

Contains the time the image was originally taken at image source, microseconds offset to UTC time.

The same design rules as for timestampSeconds member applies. If the granularity of system clock or camera clock (if image bits are time-tagged at hardware) is not good enough to deliver microseconds, close-by values like milliseconds or tenths of a second are also fine.

In C/C++ world, this header member is an signed int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), de.desy.tine.types.IMAGE.SourceHeader.setTimeStamp(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ timestampSeconds

int de.desy.tine.types.IMAGE.SourceHeader.timestampSeconds

Contains the time the image was originally taken at image source, UTC seconds part.

The design rule is that this timestamp should be acquired as early as possible after image acquire from hardware sensor. Some digital cameras are even capable of tagging image data with a proper timestamp. This timestamp, as it is most precise one can get, should be transformed and copied here. The aim of the game is not to take a second timestamp in source code once the image is received in software, except if no other possibility exist.

In C/C++ world, this header member is an unsigned int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), de.desy.tine.types.IMAGE.SourceHeader.setTimeStamp(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ totalLength

long de.desy.tine.types.IMAGE.SourceHeader.totalLength

Contains the whole length of the data block as it would be transferred bytewise on network level.

This value contains physical amount of bytes necessary for sourceHeader, for frameHeader and the net size of appended frame bits. If no frame bits are appended, the size of sourceHeader plus frameHeader must be contained within.

For practical reason, current C/C++ implementations of the VideoSystem V3 are limited to 6 Megabytes of frame bits size plus header size (sourceHeader + frameHeader). But the general design rule is that an application should never expect to receive image frames that are less than or equal to 6 megabytes in size.

In C/C++ world, this header member is an unsigned int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), de.desy.tine.types.IMAGE.SourceHeader.setTotalLength(), and de.desy.tine.types.IMAGE.SourceHeader.write().

◆ versionTag

long de.desy.tine.types.IMAGE.SourceHeader.versionTag = IMAGE_INITIAL_VERSION

Defines the version of the IMAGE header.

At the moment only version 1 is defined so this tag is fixed to '1'. Applications are asked to check this version number whether it meets their minimum requirements. It is foreseen that future header versions will be backward compatible. New applications should be able to work with old headers and new headers. Old applications can only work with old headers. Checking is performed based on integer comparison.

if (versionTag == 0x1) { good_header_version } else { bad header }

In C/C++ world, this header member is an unsigned int32.

Referenced by de.desy.tine.types.IMAGE.SourceHeader.read(), de.desy.tine.types.IMAGE.SourceHeader.setStaticValues(), and de.desy.tine.types.IMAGE.SourceHeader.write().


The documentation for this class was generated from the following file: