8#ifndef META_OCEAN_TEST_TESTBASE_TEST_FRAME_H
9#define META_OCEAN_TEST_TESTBASE_TEST_FRAME_H
38 static bool test(
const double testDuration);
281 template <
typename T>
293 template <
typename T>
294 static bool testPlaneContructors(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const unsigned int paddingElements);
305 template <
typename T>
306 static bool testPlaneCopyContructors(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const unsigned int paddingElements);
315 template <
typename T>
340 static inline bool validateFrameSpecification(
const Frame& frame,
const FrameType& frameType,
const unsigned int paddingElements,
const unsigned int bytesPerElement,
const bool isOwner,
const bool isReadOnly);
349 template <
typename T>
This class implements Ocean's image class.
Definition Frame.h:1808
Definition of a frame type composed by the frame dimension, pixel format and pixel origin.
Definition Frame.h:30
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition Frame.h:183
std::vector< PixelFormat > PixelFormats
Definition of a vector holding pixel formats.
Definition Frame.h:1040
uint32_t numberPlanes() const
Returns the number of planes of the pixel format of this frame.
Definition Frame.h:3210
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements tests for the Frame class.
Definition TestFrame.h:30
static bool testFrameSpecificationNonGenericPixelFormats(const double testDuration)
Tests the whether the frame specifications for non-generic pixel formats are correct.
static bool testMoveConstructor(const double testDuration)
Tests all move constructors.
static bool testPlaneContructors(const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int paddingElements)
Tests the Plane constructors for a specified resolution, channel number and element type.
static bool testHaveIntersectingMemory(const double testDuration)
Tests several generic pixel format functions.
static bool validatePlaneInitializer(const FrameType &frameType, RandomGenerator &randomGenerator)
Validates the initializer for one plane.
static bool testStrideBytes2paddingElements(const double testDuration)
Tests the function calculating padding elements based on stride bytes.
static bool testSetFrameType(const double testDuration)
Tests the set function for frame types.
static bool testLegacyCopy(const double testDuration)
Tests the legacy copy function of the entire image.
static bool testPlaneCopyContructors(const double testDuration)
Tests the Plane copy constructors.
static bool testDefinedDataTypes()
Test ensuring that the function returning all data types is correct.
static bool testSubFrame(const double testDuration)
Tests the extraction of a sub-frame.
static bool testFrameSpecificationGenericPixelFormats(const double testDuration)
Tests the whether the frame specifications for generic pixel formats are correct.
static bool testCopyConstructor(const double testDuration)
Tests all copy constructors.
static bool testPlaneCopyContructors(const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int paddingElements)
Tests the Plane copy constructors for a specified resolution, channel number and element type.
static bool testConstructor(const double testDuration)
Tests all constructors.
static bool testTranslateDataType()
Tests the translate data type functions.
static bool testAccessorsDataTypes(const double testDuration)
Tests the row and pixel accessor function based on data types.
static FrameType randomizedFrameType(const FrameType::PixelFormats &pixelFormats, RandomGenerator *randomGenerator=nullptr)
Returns a random frame type.
static bool test(const double testDuration)
Invokes all tests.
static bool testMakeContinuous(const double testDuration)
Tests the make continuous function.
static bool testPlaneContructors(const double testDuration)
Tests the Plane constructors.
static bool testPlaneBytesPerPixel()
Tests the plane bits per pixel function.
static bool testTranslatePixelFormat()
Tests the translate pixel format functions.
static bool testAccessorsPixelFormats(const double testDuration)
Tests the row and pixel accessor function based on pixel formats.
static bool testExtremeResolutions(const double testDuration)
Tests the creation of a frame with extreme resolutions or padding.
static bool testCopy(const FrameType::PixelFormat pixelFormat, RandomGenerator &randomGenerator)
Tests the copy function.
static bool testSetValue(const double testDuration)
Tests the setValue functions.
static FrameType::PixelFormats definedPixelFormats(const FrameType::PixelFormats &genericPixelFormats=FrameType::PixelFormats())
Returns all defined pixel formats.
static bool testIsSumInsideValueRange(const double testDuration)
Sets the is sum inside value range functions.
static bool testTimestamp(const double testDuration)
Tests timestamps.
static bool testRelease(const double testDuration)
Tests the release function.
static bool testPlaneLayout(const double testDuration)
Tests the plane layout function.
static bool testContainsValue(const double testDuration)
Tests the containsValue functions.
static bool testDefinedPixelFormats()
Test ensuring that the function returning all defined pixel formats is correct.
static bool testHasTransparentPixel(const double testDuration)
Tests the hasTransparentPixel function.
static bool testUpdateMemory(const double testDuration)
Tests the update memory functions.
static bool testPlaneInitializer(const double testDuration)
Tests the initializer for planes.
static bool validateFrameSpecification(const Frame &frame, const FrameType &frameType, const Indices32 &paddingElementsPerPlane, const unsigned int bytesPerElement, const bool isOwner, const bool isReadOnly)
Validates whether a given frame with multiple planes has the correct specification.
static bool testCopy(const double testDuration)
Tests the copy function.
static bool testIsProductInsideValueRange(const double testDuration)
Sets the is product inside value range functions.
static bool testCopyOperator(const double testDuration)
Tests all copy operators.
static bool testFormatIsPacked()
Tests the formatIsPacked() function.
static bool testSetValue(const Frame &frame, RandomGenerator &randomGenerator)
Tests the setValue functions.
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
The namespace covering the entire Ocean framework.
Definition Accessor.h:15