|
ifw-ccf 5.0.2
|
Frame class used to store the data and metadata for one frames received from the camera. More...
#include <dataFrame.hpp>
Public Member Functions | |
| DataFrame (const std::string &frame_id, const int16_t frame_q_nb) | |
| Get CFITSIO data type. | |
| DataFrame (const DataFrame &source) | |
| Copy constructor. | |
| DataFrame () | |
| ~DataFrame () | |
| void | Reset () |
| const std::string & | GetFrameId () const |
| Return the frame ID allocated. | |
| int16_t | GetFrameQNb () const |
| Return the frame queue number, when used in a queue. | |
| void | Store (const void *buffer, const uint32_t size, const double time, const int64_t cam_frame_count, const int64_t int_frame_count, const int64_t sub_frame_count, const int64_t exp_nb_sub_frames, const ifw::fnd::datatype::DataType data_type, const int32_t offset_x, const int32_t offset_y, const int32_t width, const int32_t height, const int32_t depth=1) |
| Store an image frame (or sub-frame) in the object. | |
| void | AddData (const void *buffer, const uint32_t size) |
| Add a new chunk of data in the image buffer. Used to build up the image incrementally. | |
| const void * | GetBuffer () const |
| Get read-only pointer to internal image buffer. | |
| void * | GetBufferReadWrite () const |
| uint32_t | GetBufferSize () const |
| Get the size of the internal buffer allocated, in bytes. | |
| uint32_t | GetDataSize () const |
| Return the size in bytes of the image. | |
| void | ResetDataSize () |
| Reset the size of the image. This indicates that no image is stored in the object. | |
| double | GetDataSum () const |
| Compute the data sum of all pixels. | |
| double | GetTime () const |
| Get the current time stamp stored in the object. | |
| int64_t | GetCamFrameCount () const |
| int64_t | GetIntFrameCount () const |
| Internall frame counter, counting the frames receives since the last Start command (first frame == 1). | |
| int64_t | GetSubFrameCount () const |
| Number of a sub-frame if the data of a frame is received in sub-frames (blocks) (first sub-frame == 1). | |
| int64_t | GetExpNbSubFrames () const |
| Expected number of sub-frames if the data of a frame is received in sub-frames (blocks). | |
| int32_t | GetOffsetX () const |
| Get horisontal offset of the ROI applied by the camera. | |
| int32_t | GetOffsetY () const |
| Get vertical offset of the ROI applied by the camera. | |
| int32_t | GetWidth () const |
| Get the width of the ROI applied by the camera. | |
| int32_t | GetHeight () const |
| Get the height of the ROI applied by the camera. | |
| int32_t | GetDepth () const |
| Get the number of frames if a three dimensional image is contained in the object. | |
| ifw::fnd::datatype::DataType | GetDataType () const |
| int32_t | GetResolution () const |
| Get the resolution (bytes/pixel) of the image currently stored in the object. | |
| bool | GetCompleted () const |
| Return true if the image in the object is complete according to width/height/data type. | |
| void | SetCompleted () |
| Mark the frame as completed. | |
| template<class TYPE > | |
| void | AddMetaData (const std::string &name, TYPE &value) |
| void | RemoveMetaData (const std::string &name) |
| Remove a given metadata parameter from the object. | |
| template<class TYPE > | |
| bool | HasMetadata (const std::string &name, TYPE &value) const |
| Get a parameter value from the configuration. | |
| std::string | ToString (const bool full=false) const |
| Generate a representative (short) string representation (summary) of the object. | |
| void | SetConsumerCount (const uint8_t count) |
| uint8_t | GetConsumerCount () const |
| void | DecrementConsumerCount (const uint8_t decr=1) |
| void | SetHandlingStartTime (const double time) |
| Set the start time for handling handling the frame. | |
| double | GetHandlingStartTime () const |
| Get the time for starting the handling of the frame. | |
| double | GetHandlingTime () const |
| Get handling time (duration for handling the frame in the given context). | |
| DataFrame & | operator= (const DataFrame &source) |
Public Member Functions inherited from ifw::ccf::Base | |
| Base () | |
| ~Base () | |
| const std::string & | GetClassName () const |
| Return the allocated name of the class. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ifw::ccf::Base | |
| static ifw::ccf::mptk::Manager & | Mptk () |
| Return reference to internal MPTK instance (singleton). | |
Protected Member Functions inherited from ifw::ccf::Base | |
| void | SetClassName (const std::string &class_name) |
| Set the name of the class in question. | |
Frame class used to store the data and metadata for one frames received from the camera.
| ifw::ccf::common::DataFrame::DataFrame | ( | const std::string & | frame_id, |
| const int16_t | frame_q_nb ) |
Get CFITSIO data type.
Constructor which accepts an ID and a instance number. Used when allocated in the internal queues.
| ifw::ccf::common::DataFrame::DataFrame | ( | const DataFrame & | source | ) |
Copy constructor.
| ifw::ccf::common::DataFrame::DataFrame | ( | ) |
| ifw::ccf::common::DataFrame::~DataFrame | ( | ) |
| void ifw::ccf::common::DataFrame::AddData | ( | const void * | buffer, |
| const uint32_t | size ) |
Add a new chunk of data in the image buffer. Used to build up the image incrementally.
|
inline |
Add a metadata parameter in the object. This may later be written into the output data files or used in other ways by the Processing Recipes or Data Publishers.
| void ifw::ccf::common::DataFrame::DecrementConsumerCount | ( | const uint8_t | decr = 1 | ) |
Decrement the consumer counter. Used internally by CCF.
| const void * ifw::ccf::common::DataFrame::GetBuffer | ( | ) | const |
Get read-only pointer to internal image buffer.
| void * ifw::ccf::common::DataFrame::GetBufferReadWrite | ( | ) | const |
Get read/write pointer to internal buffer. To be used with care. To be used with care as the data can be altered.
| uint32_t ifw::ccf::common::DataFrame::GetBufferSize | ( | ) | const |
Get the size of the internal buffer allocated, in bytes.
| int64_t ifw::ccf::common::DataFrame::GetCamFrameCount | ( | ) | const |
Counter indicating the number of the frame received from the camera, if provided by the camera (first frame == 1).
| bool ifw::ccf::common::DataFrame::GetCompleted | ( | ) | const |
Return true if the image in the object is complete according to width/height/data type.
| uint8_t ifw::ccf::common::DataFrame::GetConsumerCount | ( | ) | const |
Return the current consumer counter. Used internally by CCF.
| uint32_t ifw::ccf::common::DataFrame::GetDataSize | ( | ) | const |
Return the size in bytes of the image.
| double ifw::ccf::common::DataFrame::GetDataSum | ( | ) | const |
Compute the data sum of all pixels.
| ifw::fnd::datatype::DataType ifw::ccf::common::DataFrame::GetDataType | ( | ) | const |
Get the type of the image pixels currently stored in the object. The types defined by the FITS specification is used.
| int32_t ifw::ccf::common::DataFrame::GetDepth | ( | ) | const |
Get the number of frames if a three dimensional image is contained in the object.
| int64_t ifw::ccf::common::DataFrame::GetExpNbSubFrames | ( | ) | const |
Expected number of sub-frames if the data of a frame is received in sub-frames (blocks).
| const std::string & ifw::ccf::common::DataFrame::GetFrameId | ( | ) | const |
Return the frame ID allocated.
| int16_t ifw::ccf::common::DataFrame::GetFrameQNb | ( | ) | const |
Return the frame queue number, when used in a queue.
| double ifw::ccf::common::DataFrame::GetHandlingStartTime | ( | ) | const |
Get the time for starting the handling of the frame.
| double ifw::ccf::common::DataFrame::GetHandlingTime | ( | ) | const |
Get handling time (duration for handling the frame in the given context).
| int32_t ifw::ccf::common::DataFrame::GetHeight | ( | ) | const |
Get the height of the ROI applied by the camera.
| int64_t ifw::ccf::common::DataFrame::GetIntFrameCount | ( | ) | const |
Internall frame counter, counting the frames receives since the last Start command (first frame == 1).
| int32_t ifw::ccf::common::DataFrame::GetOffsetX | ( | ) | const |
Get horisontal offset of the ROI applied by the camera.
| int32_t ifw::ccf::common::DataFrame::GetOffsetY | ( | ) | const |
Get vertical offset of the ROI applied by the camera.
| int32_t ifw::ccf::common::DataFrame::GetResolution | ( | ) | const |
Get the resolution (bytes/pixel) of the image currently stored in the object.
| int64_t ifw::ccf::common::DataFrame::GetSubFrameCount | ( | ) | const |
Number of a sub-frame if the data of a frame is received in sub-frames (blocks) (first sub-frame == 1).
| double ifw::ccf::common::DataFrame::GetTime | ( | ) | const |
Get the current time stamp stored in the object.
| int32_t ifw::ccf::common::DataFrame::GetWidth | ( | ) | const |
Get the width of the ROI applied by the camera.
|
inline |
Get a parameter value from the configuration.
| void ifw::ccf::common::DataFrame::RemoveMetaData | ( | const std::string & | name | ) |
Remove a given metadata parameter from the object.
| void ifw::ccf::common::DataFrame::Reset | ( | ) |
| void ifw::ccf::common::DataFrame::ResetDataSize | ( | ) |
Reset the size of the image. This indicates that no image is stored in the object.
| void ifw::ccf::common::DataFrame::SetCompleted | ( | ) |
Mark the frame as completed.
| void ifw::ccf::common::DataFrame::SetConsumerCount | ( | const uint8_t | count | ) |
Set the internal counter indicating how many consumers are expected to use the data. Used internally by CCF.
| void ifw::ccf::common::DataFrame::SetHandlingStartTime | ( | const double | time | ) |
Set the start time for handling handling the frame.
| void ifw::ccf::common::DataFrame::Store | ( | const void * | buffer, |
| const uint32_t | size, | ||
| const double | time, | ||
| const int64_t | cam_frame_count, | ||
| const int64_t | int_frame_count, | ||
| const int64_t | sub_frame_count, | ||
| const int64_t | exp_nb_sub_frames, | ||
| const ifw::fnd::datatype::DataType | data_type, | ||
| const int32_t | offset_x, | ||
| const int32_t | offset_y, | ||
| const int32_t | width, | ||
| const int32_t | height, | ||
| const int32_t | depth = 1 ) |
Store an image frame (or sub-frame) in the object.
| buffer | Buffer containing the data to be stored (copied) in the object. |
| size | Size in bytes of the frame to store. |
| time | Timestamp for the image frame. |
| cam_frame_count | Frame counter as received from the camera (entire frames, first=1). |
| int_frame_count | Internal frame counter (may differ if frames skipped, first=1). |
| sub_frame_count | Sub-frame counter, if image split into multiple blocks (first = 1). |
| exp_nb_sub_frames | Expected number of sub-frames (blocks) to be received. |
| data_type | Data type. |
| offset_x | Offset in X (first pixel=1). |
| offset_y | Offset in Y (first pixel=1). |
| width | Width of image in pixels. |
| height | Height of image in pixels. |
| depth | Depth of image if consisting of multiple layers. |
| std::string ifw::ccf::common::DataFrame::ToString | ( | const bool | full = false | ) | const |
Generate a representative (short) string representation (summary) of the object.