Developer Application Interface (ARC API) v4.5.8
ARC, Inc. GenIV Application Interface
arc::gen4::CArcImage< T > Class Template Reference

#include <CArcImage.h>

Inheritance diagram for arc::gen4::CArcImage< T >:
arc::gen4::CArcBase

Public Member Functions

virtual ~CArcImage (void)=default
 
- Public Member Functions inherited from arc::gen4::CArcBase
virtual ~CArcBase (void)
 

Static Public Member Functions

static auto version (void) noexcept -> const std::string
 
static auto fill (T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows, const T uiValue) -> void
 
static auto fill (T *pBuf, const std::size_t uiBytes, const T uiValue) -> void
 
static auto fillWithGradient (T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto fillWithSmiley (T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto fillWithRamp (T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto containsValidRamp (const T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto containsValidArc440Synthetic (const T *pBuf, const std::uint32_t uiPixelsPerChannel, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto containsValidArc420Synthetic (const T *pBuf, const std::uint16_t uwValue1=0x1234, const std::uint16_t uwValue2=0x6789) -> void
 
static auto countPixels (const T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows, const std::uint16_t uwValue) -> std::uint32_t
 
static auto countPixels (const T *pBuf, const std::size_t uiBufSize, const std::uint16_t uwValue) -> std::uint32_t
 
static auto getChannel (const T *pBuf, const std::uint32_t uiChannel, const std::uint32_t uiChannelCount, const std::uint32_t uiStart, const std::uint32_t uiEnd, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< T[]>
 
static auto getPixel (const T *pBuf, const std::uint32_t uiCol, const std::uint32_t uiRow, const std::uint32_t uiCols, const std::uint32_t uiRows) -> T
 
static auto getRegion (const T *pBuf, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< T[]>
 
static auto getRow (const T *pBuf, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< T[]>
 
static auto getCol (const T *pBuf, const std::uint32_t uiCol, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, std::uint32_t &uiCount) -> std::unique_ptr< T[]>
 
static auto getRowArea (const T *pBuf, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< double[]>
 
static auto getColArea (const T *pBuf, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< double[]>
 
static auto getStats (std::vector< T * > vBufferList, const std::uint32_t uiChannelCount, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< arc::gen4::image::avgStats_t >
 
static auto getStats (const T *pBuf, const std::uint32_t uiCol1, const std::uint32_t uiCol2, const std::uint32_t uiRow1, const std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< arc::gen4::image::stats_t >
 
static auto getStats (const T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< arc::gen4::image::stats_t >
 
static auto getDiffStats (const T *pBuf1, const T *pBuf2, const std::uint32_t uiCol1, std::uint32_t uiCol2, const std::uint32_t uiRow1, std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< arc::gen4::image::difStats_t >
 
static auto getDiffStats (const T *pBuf1, const T *pBuf2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< arc::gen4::image::difStats_t >
 
static auto histogram (const T *pBuf, const std::uint32_t uiCol1, std::uint32_t uiCol2, const std::uint32_t uiRow1, std::uint32_t uiRow2, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< std::uint32_t[]>
 
static auto histogram (const T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows, std::uint32_t &uiCount) -> std::unique_ptr< std::uint32_t[]>
 
static auto add (const T *pBuf1, const T *pBuf2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< std::uint64_t[]>
 
static auto subtract (const T *pBuf1, const T *pBuf2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< T[]>
 
static auto subtractHalves (T *pBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto divide (const T *pBuf1, const T *pBuf2, const std::uint32_t uiCols, const std::uint32_t uiRows) -> std::unique_ptr< T[]>
 
static auto copy (T *pDstBuf, const T *pSrcBuf, const std::uint32_t uiCols, const std::uint32_t uiRows) -> void
 
static auto copy (T *pDstBuf, const T *pSrcBuf, const std::size_t uiSize) -> void
 
static auto maxTVal (void) -> std::uint32_t
 
- 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
 

Additional Inherited Members

- 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

template<typename T = arc::gen4::image::BPP_16>
class arc::gen4::CArcImage< T >

ARC image processing class. WARNING - All methods within this class perform destructive operations on the original image buffer. i.e. Original buffer contents will be modified in place.

See also
arc::gen4::CArcBase

Definition at line 137 of file CArcImage.h.

Constructor & Destructor Documentation

◆ ~CArcImage()

template<typename T = arc::gen4::image::BPP_16>
virtual arc::gen4::CArcImage< T >::~CArcImage ( void  )
virtualdefault

Destructor

Member Function Documentation

◆ version()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::version ( void  ) -> const std::string
staticnoexcept

Returns a textual representation of the library version.

Returns
A string representation of the library version.

◆ fill() [1/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::fill ( T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
const T  uiValue 
) -> void
static

Fills the specified buffer with the specified value.

Parameters
pBuf- Pointer to the image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiValue- The value to fill the buffer with.
Exceptions
std::invalid_argument
std::out_of_range

◆ fill() [2/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::fill ( T *  pBuf,
const std::size_t  uiBytes,
const T  uiValue 
) -> void
static

Fills the specified buffer with the specified value.

Parameters
pBuf- Pointer to the image buffer.
uiBytes- The number of bytes in the image data buffer.
uiValue- The value to fill the buffer with.
Exceptions
std::invalid_argument
std::out_of_range

◆ fillWithGradient()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::fillWithGradient ( T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Fills the specified buffer with a gradient pattern.

Parameters
pBuf- Pointer to the image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::invalid_argument

◆ fillWithSmiley()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::fillWithSmiley ( T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Fills the specified buffer with zeroes and puts a smiley face at the center.

Parameters
pBuf- Pointer to the image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::invalid_argument

◆ fillWithRamp()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::fillWithRamp ( T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Fills the specified buffer with a ramp image. Data has the form 0, 1, 2, ..., 65535, 0, 1, ....

Parameters
pBuf- Pointer to the image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::invalid_argument

◆ containsValidRamp()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::containsValidRamp ( const T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Verify a ramp synthetic image. Data has the form 0, 1, 2, ..., 65535, 0, 1, ....

Parameters
pBuf- Pointer to the image data buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::runtime_error
std::invalid_argument

◆ containsValidArc440Synthetic()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::containsValidArc440Synthetic ( const T *  pBuf,
const std::uint32_t  uiPixelsPerChannel,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Verify an ARC-440 synthetic image.

Parameters
pBuf- Pointer to the image data buffer.
uiPixelsPerChannel- The number of pixels per channel. Must be a multiple of 16.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::runtime_error
std::invalid_argument

◆ containsValidArc420Synthetic()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::containsValidArc420Synthetic ( const T *  pBuf,
const std::uint16_t  uwValue1 = 0x1234,
const std::uint16_t  uwValue2 = 0x6789 
) -> void
static

Verify an ARC-420 synthetic image, which is a checkerboard pattern with a fixed image size of 2048x2048 with 16-channels.

Parameters
pBuf- Pointer to the image data buffer.
uiValue1- The first checkerboard square pixel value.
uiValue2- The second checkerboard square pixel value.
Exceptions
std::runtime_error
std::invalid_argument

◆ countPixels() [1/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::countPixels ( const T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
const std::uint16_t  uwValue 
) -> std::uint32_t
static

Count the number of pixels having the specified value.

Parameters
pBuf- Pointer to the image data buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uwValue- The pixel value to include in the count.
Exceptions
std::runtime_error
std::invalid_argument

◆ countPixels() [2/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::countPixels ( const T *  pBuf,
const std::size_t  uiBufSize,
const std::uint16_t  uwValue 
) -> std::uint32_t
static

Count the number of pixels having the specified value.

Parameters
pBuf- Pointer to the image data buffer.
uiBufSize- The image buffer size ( in pixels ).
uwValue- The pixel value to include in the count.
Exceptions
std::runtime_error
std::invalid_argument

◆ getChannel()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getChannel ( const T *  pBuf,
const std::uint32_t  uiChannel,
const std::uint32_t  uiChannelCount,
const std::uint32_t  uiStart,
const std::uint32_t  uiEnd,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< T[]>
static

Returns all the pixels in a specified channel column.

Parameters
pBuf- Pointer to the image buffer.
uiChannel- The channel number.
uiChannelCount- The total number of channels in the image.
uiStart- The start position.
uiEnd- The end position.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to the array of channel data.
Exceptions
std::runtime_error
std::invalid_argument

◆ getPixel()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getPixel ( const T *  pBuf,
const std::uint32_t  uiCol,
const std::uint32_t  uiRow,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> T
static

Returns the value of a pixel at the specified row and column.

Parameters
pBuf- Pointer to the image buffer.
uiCol- The pixel column number.
uiRow- The pixel row number.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
The pixel value at the specified row and column.
Exceptions
std::runtime_error
std::invalid_argument

◆ getRegion()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getRegion ( const T *  pBuf,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< T[]>
static

Returns a region of an image.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to an array of type T, where CArcImage<T>.
Exceptions
std::runtime_error
std::invalid_argument

◆ getRow()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getRow ( const T *  pBuf,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< T[]>
static

Returns all or part of an image row.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow- The row to read from.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to an array of type T, where CArcImage<T>.
Exceptions
std::runtime_error
std::invalid_argument

◆ getCol()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getCol ( const T *  pBuf,
const std::uint32_t  uiCol,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
std::uint32_t &  uiCount 
) -> std::unique_ptr< T[]>
static

Returns all or part of an image column.

Parameters
pBuf- Pointer to the image data buffer.
uiCol- The column to read from.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to an array of type T, where CArcImage<T>.
Exceptions
std::runtime_error
std::invalid_argument

◆ getRowArea()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getRowArea ( const T *  pBuf,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< double[]>
static

Returns a row of pixel data where each value is the average over the specified range of columns.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to an array of doubles.
Exceptions
std::runtime_error
std::invalid_argument

◆ getColArea()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getColArea ( const T *  pBuf,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< double[]>
static

Returns a column of pixel data where each value is the average over the specified range of rows.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The pixel count of the returned array.
Returns
A std::unique_ptr to an array of doubles.
Exceptions
std::runtime_error
std::invalid_argument

◆ getStats() [1/3]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getStats ( std::vector< T * >  vBufferList,
const std::uint32_t  uiChannelCount,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< arc::gen4::image::avgStats_t >
static

Calculates the image min, max, mean, variance, standard deviation, total pixel count and saturated pixel count over the specified image buffer cols and rows.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A std::unique_ptr to an arc::gen4::image::stats_t object.
Exceptions
std::runtime_error
std::invalid_argument
std::length_error

◆ getStats() [2/3]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getStats ( const T *  pBuf,
const std::uint32_t  uiCol1,
const std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
const std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< arc::gen4::image::stats_t >
static

Calculates the image min, max, mean, variance, standard deviation, total pixel count and saturated pixel count over the specified image buffer cols and rows.

Parameters
pBuf- Pointer to the image data buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A std::unique_ptr to an arc::gen4::image::stats_t object.
Exceptions
std::runtime_error
std::invalid_argument

◆ getStats() [3/3]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getStats ( const T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< arc::gen4::image::stats_t >
static

Calculates the image min, max, mean, variance, standard deviation, total pixel count and saturated pixel count over the entire image.

Parameters
pBuf- Pointer to the image data buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A std::unique_ptr to an arc::gen4::image::stats_t object.
Exceptions
std::runtime_error
std::invalid_argument

◆ getDiffStats() [1/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getDiffStats ( const T *  pBuf1,
const T *  pBuf2,
const std::uint32_t  uiCol1,
std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< arc::gen4::image::difStats_t >
static

Calculates the min, max, mean, variance, standard deviation, total pixel count and saturated pixel count for each image as well as the difference mean, variance and standard deviation over the specified image buffer cols and rows. This is used for photon transfer curves ( PTC ). The two images MUST be the same size or the methods behavior is undefined as this cannot be verified using the given parameters.

Parameters
pBuf1- Pointer to the first image buffer.
pBuf2- Pointer to the second image buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A std::unique_ptr to an arc::gen4::image::difStats_t object.
Exceptions
std::runtime_error
std::invalid_argument

◆ getDiffStats() [2/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::getDiffStats ( const T *  pBuf1,
const T *  pBuf2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< arc::gen4::image::difStats_t >
static

Calculates the min, max, mean, variance, standard deviation, total pixel count and saturated pixel count for each image as well as the difference mean, variance and standard deviation for the entire image. This is used for photon transfer curves ( PTC ). The two images MUST be the same size or the methods behavior is undefined as this cannot be verified using the given parameters.

Parameters
pBuf1- Pointer to the first image buffer.
pBuf2- Pointer to the second image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A std::unique_ptr to an arc::gen4::image::difStats_t object.
Exceptions
std::runtime_error
std::invalid_argument

◆ histogram() [1/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::histogram ( const T *  pBuf,
const std::uint32_t  uiCol1,
std::uint32_t  uiCol2,
const std::uint32_t  uiRow1,
std::uint32_t  uiRow2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< std::uint32_t[]>
static

Calculates the histogram over the specified image buffer columns and rows.

Parameters
pBuf- Pointer to the image buffer.
uiCol1- The start column.
uiCol2- The end column.
uiRow1- The start row.
uiRow2- The end row.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The element count of the returned array.
Returns
A std::unique_ptr to an array of unsigned integers. The size of the array depends on the image data type.
Exceptions
std::runtime_error
std::invalid_argument

◆ histogram() [2/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::histogram ( const T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows,
std::uint32_t &  uiCount 
) -> std::unique_ptr< std::uint32_t[]>
static

Calculates the histogram over the entire image buffer.

Parameters
pBuf- Pointer to the image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
uiCount- The element count of the returned array.
Returns
A std::unique_ptr to an array of unsigned integers. The size of the array depends on the image data type.
Exceptions
std::runtime_error
std::invalid_argument

◆ add()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::add ( const T *  pBuf1,
const T *  pBuf2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< std::uint64_t[]>
static

Adds two buffers together pixel by pixel.

Parameters
pBuf1- Pointer to the first image buffer.
pBuf2- Pointer to the second image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A pointer to a 64-bit buffer.
Exceptions
std::runtime_error
std::invalid_argument

◆ subtract()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::subtract ( const T *  pBuf1,
const T *  pBuf2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< T[]>
static

Subtracts two image buffers pixel by pixel. Buffer two is subtracted from buffer one.

Parameters
pBuf1- Pointer to the first image buffer. Result is placed in this buffer.
pBuf2- Pointer to the second image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A pointer to a buffer with the same data type as the two images being subtracted.
Exceptions
std::runtime_error
std::invalid_argument

◆ subtractHalves()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::subtractHalves ( T *  pBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Subtracts one half of an image from the other. The first half of the image buffer is replaced with the new image.

Parameters
pBuf- Pointer to the image buffer. Result is placed in this buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Exceptions
std::runtime_error
std::invalid_argument

◆ divide()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::divide ( const T *  pBuf1,
const T *  pBuf2,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> std::unique_ptr< T[]>
static

Divide two image buffers pixel by pixel.

Parameters
pBuf1- Pointer to the first image buffer.
pBuf2- Pointer to the second image buffer.
uiCols- The image column size ( in pixels ).
uiRows- The image row size ( in pixels ).
Returns
A pointer to a buffer with the same data type as the two images being divided.
Exceptions
std::runtime_error
std::invalid_argument

◆ copy() [1/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::copy ( T *  pDstBuf,
const T *  pSrcBuf,
const std::uint32_t  uiCols,
const std::uint32_t  uiRows 
) -> void
static

Copies the source image buffer to the destination image buffer. The source buffer must be less than or equal in dimensions to the destination buffer.

Parameters
pDstBuf- Pointer to the destination image buffer. Result is placed in this buffer.
pSrcBuf- Pointer to the source image buffer.
uiCols- The number of image column pixels to copy.
uiRows- The number of image row pixels to copy.
Exceptions
std::runtime_error
std::invalid_argument

◆ copy() [2/2]

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::copy ( T *  pDstBuf,
const T *  pSrcBuf,
const std::size_t  uiSize 
) -> void
static

Copies the source image buffer to the destination image buffer. The source buffer must be less than or equal in dimensions to the destination buffer.

Parameters
pDstBuf- Pointer to the destination image buffer. Result is placed in this buffer.
pSrcBuf- Pointer to the source image buffer.
uiSize- The number of image bytes to copy.
Exceptions
std::runtime_error
std::invalid_argument

◆ maxTVal()

template<typename T = arc::gen4::image::BPP_16>
static auto arc::gen4::CArcImage< T >::maxTVal ( void  ) -> std::uint32_t
static

Determines the maximum value for a specific data type. Example, for std::uint16_t: 2^16 = 65536.

Returns
The maximum value for the data type currently in use.