Oyranos Colour Management System API
Public Member Functions | Data Fields
oyArray2d_s Struct Reference

2d data array More...

#include <oyranos_alpha.h>

Collaboration diagram for oyArray2d_s:
Collaboration graph
[legend]

Public Member Functions

OYAPI oyArray2d_s *OYEXPORT oyArray2d_New (oyObject_s object)
 allocate a new Array2d 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 oyArray2d_s *OYEXPORT oyArray2d_Copy (oyArray2d_s *obj, oyObject_s object)
 copy or reference a Array2d object
int oyArray2d_ReleaseArray (oyArray2d_s *obj)
 release Array2d::array member
OYAPI int OYEXPORT oyArray2d_Release (oyArray2d_s **obj)
 release and possibly deallocate a Array2d object
int oyArray2d_SetFocus (oyArray2d_s *array, oyRectangle_s *rectangle)
 move a arrays active area to a given rectangle

Data Fields

oyStruct_Copy_f copy
oyStruct_Release_f release
oyDATATYPE_e t
int width
int height
oyRectangle_s data_area
unsigned char ** array2d
int own_lines
oyStructList_s * refs_
oyArray2d_srefered_

Detailed Description

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.

dot_inline_dotgraph_9.png
Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

Field Documentation

unsigned char** oyArray2d_s::array2d
oyStruct_Copy_f oyArray2d_s::copy

copy function

size of reserve pixels, x,y <= 0, width,height >= data view width,height

Referenced by oyArray2d_ReleaseArray(), oyArray2d_SetFocus(), oyImage_s::oyImage_FillArray(), and oyImage_s::oyImage_ReadArray().

Are *array2d rows owned by object?

  • 0 not owned by the object
  • 1 one own monolithic memory block starting in array2d[0]
  • 2 several owned memory blocks

Referenced by oyArray2d_Create(), and oyImage_s::oyImage_FillArray().

array this one refers to

oyStructList_s* oyArray2d_s::refs_

references of other arrays to this

oyStruct_Release_f oyArray2d_s::release

release function

Referenced by oyArray2d_New().

data type

Referenced by oyArray2d_ReleaseArray(), and oyArray2d_SetFocus().