Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
arc::gen4::CArcImageAssembler Class Referencefinal

#include <CArcImageAssembler.h>

Inheritance diagram for arc::gen4::CArcImageAssembler:
arc::gen4::CArcBase

Public Member Functions

 CArcImageAssembler (void)
 
 ~CArcImageAssembler (void)=default
 
auto run (std::queue< arc::gen4::CArcImagePacket * > *pQueue, std::uint16_t *pImageBuffer, pSysState_t pSysState) -> std::uint32_t
 
auto errorList (void) noexcept -> std::shared_ptr< CArcStringList >
 
void enableChannelPixelCounts (const bool bEnable=true)
 
auto channelPixelCountsEnabled (void) const noexcept -> bool
 
auto getChannelPixelCounts (void) const noexcept -> const std::uint32_t *
 
void resetChannelPixelCounts (void)
 
void enableImagePacketSave (bool bEnable, const std::string &sFileName="", arc::gen4::packetFileType_e eFileType=arc::gen4::packetFileType_e::text)
 
void disable (const bool bDisable=true) noexcept
 
bool isDisabled (void) noexcept
 
- Public Member Functions inherited from arc::gen4::CArcBase
virtual ~CArcBase (void)
 

Static Public Attributes

static constexpr std::int32_t CHANNEL_COUNT = 64
 

Additional Inherited Members

- Static Public Member Functions inherited from arc::gen4::CArcBase
static const std::string version (void)
 
static void zeroMemory (void *pDest, std::size_t uiSize)
 
static void copyMemory (void *pDest, void *pSrc, std::size_t uiSize)
 
template<typename T >
static std::tuple< T *, T * > copyAndIncrement (void *pDest, void *pSrc, const std::size_t uiSize)
 
template<typename ErrCode >
requires std::is_integral_v<ErrCode>
static const std::string getSystemErrorMessage (ErrCode iErrCode)
 
static const std::string getSystemErrorMessage (void)
 
static std::uint32_t getSystemError (void) noexcept
 
static pStringList_t splitString (const std::string &sString, const char &zDelim=' ')
 
static std::string formatString (const char *pszFmt,...)
 
static const std::filesystem::path incrementFileName (const std::filesystem::path &tFilePath="", const std::int32_t iStartValue=-1)
 
static std::string convertWideToAnsi (const wchar_t wzString[]) noexcept
 
static std::string convertWideToAnsi (const std::wstring &wsString)
 
static std::wstring convertAnsiToWide (const char *pszString)
 
static std::string cmdToString (const std::uint32_t uiCmd)
 
template<typename T >
static std::string iterToString (T *begin, T *end, const char zSeperator=' ')
 
static std::string setDots (const std::string &sText, const std::size_t uiMaxLength, const char szDot='.')
 
static std::string trim (const std::string &sText) noexcept
 
static const std::chrono::time_point< std::chrono::high_resolution_clock > startCodeTime (void) noexcept
 
template<typename T >
static constexpr auto endCodeTime (const std::chrono::time_point< std::chrono::high_resolution_clock > tStartTimePoint) noexcept
 
- Protected Member Functions inherited from arc::gen4::CArcBase
 CArcBase (void)=default
 
 CArcBase (const CArcBase &)=delete
 
 CArcBase (CArcBase &&)=delete
 
CArcBaseoperator= (const CArcBase &)=delete
 
CArcBaseoperator= (CArcBase &&)=delete
 
- Static Protected Attributes inherited from arc::gen4::CArcBase
static const std::string m_sVersion
 

Detailed Description

Image assembler class. This class re-assembles images from GenIV image packets.

See also
arc::gen4::CArcBase

Definition at line 74 of file CArcImageAssembler.h.

Constructor & Destructor Documentation

◆ CArcImageAssembler()

arc::gen4::CArcImageAssembler::CArcImageAssembler ( void  )

Default constructor

◆ ~CArcImageAssembler()

arc::gen4::CArcImageAssembler::~CArcImageAssembler ( void  )
default

Default destructor

Member Function Documentation

◆ run()

auto arc::gen4::CArcImageAssembler::run ( std::queue< arc::gen4::CArcImagePacket * > *  pQueue,
std::uint16_t *  pImageBuffer,
pSysState_t  pSysState 
) -> std::uint32_t

Run the assembler on the specified set of image packet queue.

Parameters
pQueue- A pointer to the image packet queue to use for the data source.
pImageBuffer- A pointer to an image buffer larget enough to hold the reassembled image.
pSysState- A pointer to a system state object that contains the image details (channel number, cols, rows, etc).
Returns
The total number of pixels assembled.
Exceptions
std::invalid_argument

◆ errorList()

auto arc::gen4::CArcImageAssembler::errorList ( void  ) -> std::shared_ptr< CArcStringList >
noexcept

Returns a string list of any errors that were generated during processing.

Returns
A string list of errors generated during assembly.

◆ enableChannelPixelCounts()

void arc::gen4::CArcImageAssembler::enableChannelPixelCounts ( const bool  bEnable = true)

Enable pixel count data to be tracked for each channel during image assembly.

Parameters
bEnable- Set to true to enable pixel counting; false to disable.
Exceptions
std::runtime_error

◆ channelPixelCountsEnabled()

auto arc::gen4::CArcImageAssembler::channelPixelCountsEnabled ( void  ) const -> bool
noexcept

Returns whether or not channel pixel counting is enabled.

Returns
true if enabled; false if disabled.

◆ getChannelPixelCounts()

auto arc::gen4::CArcImageAssembler::getChannelPixelCounts ( void  ) const -> const std::uint32_t *
noexcept

Returns a pointer to the pixel counts per channel. The size of the channel array is defined by CArcImageAssembler::CHANNEL_COUNT. Each index in the array represents the channel number, while the value at each index represents the total pixel counts for that channel. The returned array always contains CHANNEL_COUNT elements regardless of how many channels are in the image.

Returns
The generated channel pixel counts. The returned pointer is owned by this object and not the caller.

◆ resetChannelPixelCounts()

void arc::gen4::CArcImageAssembler::resetChannelPixelCounts ( void  )

Resets the channel pixel counts by clearing any existing values.

◆ enableImagePacketSave()

void arc::gen4::CArcImageAssembler::enableImagePacketSave ( bool  bEnable,
const std::string &  sFileName = "",
arc::gen4::packetFileType_e  eFileType = arc::gen4::packetFileType_e::text 
)

Enables or disables saving of the image packets to either a text or binary file. NOTE: this process will dramatically slow down the expose post-processing time. It's not recommended to use unless necessary to debug readout issues.

Parameters
bEnable- true to enable saving image packets, false to disable.
sFileName- The filename for the saved packet data. May be empty string ("") if previously set and only want to enable or disable the packet saving. Non-empty value will update the current filename (default: "").
eFileType- The data file format, text or binary (default: text).
Exceptions
std::invalid_parameter

◆ disable()

void arc::gen4::CArcImageAssembler::disable ( const bool  bDisable = true)
noexcept

Disable the assembler from running

Parameters
bDisable- true to disable the assembler, false to enable (default: true).

◆ isDisabled()

bool arc::gen4::CArcImageAssembler::isDisabled ( void  )
noexcept

Returns whether or not the assembler has been disable via the disable method.

Member Data Documentation

◆ CHANNEL_COUNT

constexpr std::int32_t arc::gen4::CArcImageAssembler::CHANNEL_COUNT = 64
staticconstexpr

The size of the channel pixel count array

Definition at line 144 of file CArcImageAssembler.h.