![]() |
Oyranos Color Management System API - Version 0.9.6 |
2d data array More...
#include <oyArray2d_s.h>
Public Member Functions | |
OYAPI oyArray2d_s *OYEXPORT | oyArray2d_New (oyObject_s object) |
allocate a new Array2d object | |
oyArray2d_Copy | |
Copy or Reference a Array2d object. | |
OYAPI int OYEXPORT | oyArray2d_Release (oyArray2d_s **array2d) |
release and possibly deallocate a oyArray2d_s object | |
OYAPI oyArray2d_s *OYEXPORT | oyArray2d_Create (oyPointer data, int width, int height, oyDATATYPE_e data_type, oyObject_s object) |
Allocate and initialise a oyArray2d_s object. | |
OYAPI oyPointer OYEXPORT | oyArray2d_GetData (oyArray2d_s *obj) |
Get the data blob. | |
OYAPI int OYEXPORT | oyArray2d_SetData (oyArray2d_s *obj, oyPointer data) |
Set the data blob and (re-)initialise the object. | |
OYAPI int OYEXPORT | oyArray2d_SetRows (oyArray2d_s *obj, oyPointer *rows, int do_copy) |
Set the data and (re-)initialise the object. | |
int | oyArray2d_SetFocus (oyArray2d_s *array, oyRectangle_s *rectangle) |
Move a arrays active area to a given rectangle. | |
OYAPI int OYEXPORT | oyArray2d_Reset (oyArray2d_s *array, int width, int height, oyDATATYPE_e data_type) |
Reinitialise Array. | |
OYAPI double OYEXPORT | oyArray2d_GetDataGeo1 (oyArray2d_s *array, int x_y_w_h) |
Get Geometry of the data rectangle. | |
OYAPI int OYEXPORT | oyArray2d_GetWidth (oyArray2d_s *array) |
Get data Width. | |
OYAPI int OYEXPORT | oyArray2d_GetHeight (oyArray2d_s *array) |
Get data Height. | |
OYAPI oyDATATYPE_e OYEXPORT | oyArray2d_GetType (oyArray2d_s *array) |
Get data Type. | |
OYAPI const char *OYEXPORT | oyArray2d_Show (oyArray2d_s *array, int channels) |
Print array geometries. | |
![]() | |
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
get object infos from a module | |
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
Get a text dump. | |
oyStruct_RegisterStaticMessageFunc | |
register a function for verbosity | |
oyStruct_GetInfo | |
get a additional string from a object | |
const char * | oyStructTypeToText (oyOBJECT_e type) |
Objects type to small string. |
Data Fields | |
const oyOBJECT_e | type_ |
Type of object. | |
oyStruct_Copy_f | copy |
Copy function. | |
oyStruct_Release_f | release |
Release function. | |
oyObject_s | oy_ |
Oyranos internal object. | |
![]() | |
const oyOBJECT_e | type_ |
Type of object. | |
oyStruct_Copy_f | copy |
Copy function. | |
oyStruct_Release_f | release |
Release function. | |
oyObject_s | oy_ |
Oyranos internal object. |
2d data array
oyArray2d_s is a in memory data view. The array2d holds pointers to lines in the original memory blob. The arrays contained in array2d represent the samples. There is no information in which order the samples appear. No pixel layout or meaning is provided. Given the coordinates x and y, a samples memory adress can be accessed by &array2d[y][x] . This adress must be converted to the data type provided in oyArray2d_s::t.
The oyArray2d_s::data pointer should be observed in order to be signaled about its invalidation.
oyArray2d_Copy |
Copy or Reference a Array2d object.
The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.
[in] | array2d | Array2d struct object |
object | NULL - means reference, the optional object triggers a real copy |
Referenced by oyPixelAccess_s::oyPixelAccess_GetArray(), and oyPixelAccess_s::oyPixelAccess_SetArray().
OYAPI oyArray2d_s *OYEXPORT oyArray2d_Create | ( | oyPointer | data, |
int | width, | ||
int | height, | ||
oyDATATYPE_e | data_type, | ||
oyObject_s | object | ||
) |
Allocate and initialise a oyArray2d_s object.
Function oyArray2d_Create
References oyArray2d_SetData(), oyDataTypeGetSize(), and oyYES.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
OYAPI oyPointer OYEXPORT oyArray2d_GetData | ( | oyArray2d_s * | obj | ) |
Get the data blob.
Function oyArray2d_GetData
[in,out] | obj | struct object |
References oyOBJECT_ARRAY2D_S.
OYAPI double OYEXPORT oyArray2d_GetDataGeo1 | ( | oyArray2d_s * | array, |
int | x_y_w_h | ||
) |
Get Geometry of the data rectangle.
Function oyArray2d_GetDataGeo1
The function informs about reserves and possible offsets.
[in,out] | array | the channels array |
References oyRectangle_s::oyRectangle_GetGeo1().
Referenced by oyImage_s::oyImage_FillArray(), oyPixelAccess_s::oyPixelAccess_PixelsToRoi(), oyPixelAccess_s::oyPixelAccess_RoiToPixels(), oyPixelAccess_s::oyPixelAccess_SetArray(), oyPixelAccess_s::oyPixelAccess_SetArrayFocus(), and oyPixelAccess_s::oyPixelAccess_Show().
OYAPI int OYEXPORT oyArray2d_GetHeight | ( | oyArray2d_s * | array | ) |
Get data Height.
Function oyArray2d_GetHeight
[in,out] | array | the channels array |
OYAPI oyDATATYPE_e OYEXPORT oyArray2d_GetType | ( | oyArray2d_s * | array | ) |
Get data Type.
Function oyArray2d_GetType
[in,out] | array | the channels array |
OYAPI int OYEXPORT oyArray2d_GetWidth | ( | oyArray2d_s * | array | ) |
Get data Width.
Function oyArray2d_GetWidth
[in,out] | array | the channels array |
OYAPI oyArray2d_s *OYEXPORT oyArray2d_New | ( | oyObject_s | object | ) |
OYAPI int OYEXPORT oyArray2d_Release | ( | oyArray2d_s ** | array2d | ) |
release and possibly deallocate a oyArray2d_s object
Function oyArray2d_Release
[in,out] | array2d | Array2d struct object |
References oyOBJECT_ARRAY2D_S.
Referenced by oyConversion_s::oyConversion_RunPixels(), oyImage_s::oyImage_FillArray(), oyPixelAccess_s::oyPixelAccess_SetArray(), oyPixelAccess_s::oyPixelAccess_SetArrayFocus(), and oyPixelAccess_s::oyPixelAccess_Show().
OYAPI int OYEXPORT oyArray2d_Reset | ( | oyArray2d_s * | array, |
int | width, | ||
int | height, | ||
oyDATATYPE_e | data_type | ||
) |
Reinitialise Array.
Function oyArray2d_Reset
References oyDataTypeGetSize(), and oyOBJECT_ARRAY2D_S.
OYAPI int OYEXPORT oyArray2d_SetData | ( | oyArray2d_s * | obj, |
oyPointer | data | ||
) |
Set the data blob and (re-)initialise the object.
Function oyArray2d_SetData
[in,out] | obj | struct object |
[in] | data | the data, remains in the property of the caller |
References oyDataTypeGetSize(), oyNO, and oyOBJECT_ARRAY2D_S.
Referenced by oyArray2d_Create().
int oyArray2d_SetFocus | ( | oyArray2d_s * | array, |
oyRectangle_s * | rectangle | ||
) |
Move a arrays active area to a given rectangle.
Function oyArray2d_SetFocus
The array works in absolute coordinates. For working in relative coordinates get first the current data_area by oyArray2d_GetDataGeo1().
[in,out] | array | the channels array |
[in] | rectangle | the new region in the array's wholes data |
References oy_debug, oyArray2d_Show(), oyDataTypeGetSize(), and oyOptions_s::oyOptions_FindInt().
Referenced by oyImage_s::oyImage_FillArray(), and oyPixelAccess_s::oyPixelAccess_SetArrayFocus().
OYAPI int OYEXPORT oyArray2d_SetRows | ( | oyArray2d_s * | obj, |
oyPointer * | rows, | ||
int | do_copy | ||
) |
Set the data and (re-)initialise the object.
Function oyArray2d_SetRows
[in,out] | obj | struct object |
[in] | data | the data |
[in] | do_copy | - 0 : take the memory as is
|
References oyDataTypeGetSize(), and oyOBJECT_ARRAY2D_S.
OYAPI const char *OYEXPORT oyArray2d_Show | ( | oyArray2d_s * | array, |
int | channels | ||
) |
Print array geometries.
Function oyArray2d_Show
This function is not thread safe.
[in] | array | the channel array |
References OY_CREATE_NEW, and oyOptions_s::oyOptions_SetFromInt().
Referenced by oyArray2d_SetFocus(), oyImage_s::oyImage_FillArray(), oyImage_s::oyImage_ReadArray(), oyPixelAccess_s::oyPixelAccess_SetArrayFocus(), and oyPixelAccess_s::oyPixelAccess_Show().
oyStruct_Copy_f oyArray2d_s::copy |
Copy function.
oyObject_s oyArray2d_s::oy_ |
Oyranos internal object.
Features name and hash. Do not change during object life time.
oyStruct_Release_f oyArray2d_s::release |
Release function.
const oyOBJECT_e oyArray2d_s::type_ |
Type of object.
The struct type tells Oyranos how to interprete hidden fields.