|
|
Data Cube
|
Typedefs |
|
typedef enum GiCubeAxes | GiCubeAxes |
|
typedef GiCubeAxis | GiCubeAxis |
Enumerations |
| enum | GiCubeAxes |
Functions |
| GiCube * | giraffe_cube_new (void) |
| | Create an empty data cube.
|
| GiCube * | giraffe_cube_create (cxsize width, cxsize height, cxsize depth, cxdouble *data) |
| | Create a data cube with the given width, height and depth.
|
| void | giraffe_cube_delete (GiCube *self) |
| | Destroys a cube object.
|
| cxsize | giraffe_cube_get_width (const GiCube *self) |
| | Get the width of the given data cube.
|
| cxsize | giraffe_cube_get_height (const GiCube *self) |
| | Get the height of the given data cube.
|
| cxsize | giraffe_cube_get_depth (const GiCube *self) |
| | Get the depth of the given data cube.
|
| cxsize | giraffe_cube_get_size (const GiCube *self) |
| | Get the size of the given data cube.
|
| cxint | giraffe_cube_set_size (GiCube *self, cxsize width, cxsize height, cxsize depth) |
| | Set the size of a data cube.
|
| cxdouble * | giraffe_cube_get_data (const GiCube *self) |
| | Get a reference to the data cube's pixel buffer.
|
| cxint | giraffe_cube_get_xaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| | Get the data cube's x-axis start value and step size.
|
| cxint | giraffe_cube_get_yaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| | Get the data cube's y-axis start value and step size.
|
| cxint | giraffe_cube_get_zaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| | Get the data cube's z-axis start value and step size.
|
| cxint | giraffe_cube_set_xaxis (GiCube *self, cxdouble start, cxdouble step) |
| | Set the data cube's x-axis start value and step size.
|
| cxint | giraffe_cube_set_yaxis (GiCube *self, cxdouble start, cxdouble step) |
| | Set the data cube's y-axis start value and step size.
|
| cxint | giraffe_cube_set_zaxis (GiCube *self, cxdouble start, cxdouble step) |
| | Set the data cube's z-axis start value and step size.
|
| cxint | giraffe_cube_save (const GiCube *self, cpl_propertylist *properties, const cxchar *filename, cxcptr data) |
| | Save the given data cube to disk.
|
Detailed Description
TBD
Function Documentation
| GiCube* giraffe_cube_create |
( |
cxsize |
width, |
|
|
cxsize |
height, |
|
|
cxsize |
depth, |
|
|
cxdouble * |
data |
|
) |
|
|
|
|
Create a data cube with the given width, height and depth.
- Parameters:
-
| width | The width of the data cube (size along the x-axis). |
| height | The width of the data cube (size along the y-axis). |
| depth | The width of the data cube (size along the z-axis). |
| data | Optional data buffer containing the data values. |
- Returns:
- The function returns a pointer to the newly created data cube, or
NULL in case of an error.
The function creates a new data cube object with the size given by width (size along the x-axis), height (size along the y-axis), and depth (size along the z-axis). A data buffer data may be passed to the function which contains the data values of the data cube. The size of data must be equal to the product of width, height and depth, and its organization in memory must be as if it is a stack of images, i.e. the rows of the first plane come first, followed by the rows of the second plane, and so on.
If a data buffer data is passed to the function, this data buffer is owned by the data cube, if the function call succeeds.
Definition at line 305 of file gicube.c.
References giraffe_error_pop(), and giraffe_error_push(). |
| void giraffe_cube_delete |
( |
GiCube * |
self |
) |
|
|
| cxdouble* giraffe_cube_get_data |
( |
const GiCube * |
self |
) |
|
|
|
|
Get a reference to the data cube's pixel buffer.
self The data cube to query.
- Returns:
- A pointer to the pixel buffer of the data cube self, or
NULL if the cube does not contain any data, or an error occurred.
The function provides a reference to the pixel buffer of the data cube self, for a fast, direct access of the pixel values.
Definition at line 565 of file gicube.c. |
| cxsize giraffe_cube_get_depth |
( |
const GiCube * |
self |
) |
|
|
|
|
Get the depth of the given data cube.
- Parameters:
-
| self | The data cube to query. |
- Returns:
- The depth of the data cube self.
The function retrieves the current depth, i.e. the size along the z-axis, of the given data cube self.
Definition at line 434 of file gicube.c. |
| cxsize giraffe_cube_get_height |
( |
const GiCube * |
self |
) |
|
|
|
|
Get the height of the given data cube.
- Parameters:
-
| self | The data cube to query. |
- Returns:
- The height of the data cube self.
The function retrieves the current height, i.e. the size along the y-axis, of the given data cube self.
Definition at line 411 of file gicube.c. |
| cxsize giraffe_cube_get_size |
( |
const GiCube * |
self |
) |
|
|
|
|
Get the size of the given data cube.
- Parameters:
-
| self | The data cube to query. |
- Returns:
- The size of the data cube self.
The function retrieves the current size, i.e. the total number of pixels (data values), of the given data cube self.
Definition at line 457 of file gicube.c. |
| cxsize giraffe_cube_get_width |
( |
const GiCube * |
self |
) |
|
|
|
|
Get the width of the given data cube.
- Parameters:
-
| self | The data cube to query. |
- Returns:
- The width of the data cube self.
The function retrieves the current width, i.e. the size along the x-axis, of the given data cube self.
Definition at line 388 of file gicube.c. |
| cxint giraffe_cube_get_xaxis |
( |
const GiCube * |
self, |
|
|
cxdouble * |
start, |
|
|
cxdouble * |
step |
|
) |
|
|
|
|
Get the data cube's x-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The location where the x-axis start value is stored. |
| step | The location where the x-axis step size is stored. |
- Returns:
- The function returns
0 on success, or a non-zero value in case the cube's axis definition was not found.
The function queries the data cube self for the start value and the step size of the cube's x-axis and stores the values in the variables pointed to by start and step respectively.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 602 of file gicube.c.
Referenced by giraffe_cube_save(). |
| cxint giraffe_cube_get_yaxis |
( |
const GiCube * |
self, |
|
|
cxdouble * |
start, |
|
|
cxdouble * |
step |
|
) |
|
|
|
|
Get the data cube's y-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The location where the y-axis start value is stored. |
| step | The location where the y-axis step size is stored. |
- Returns:
- The function returns
0 on success, or a non-zero value in case the cube's axis definition was not found.
The function queries the data cube self for the start value and the step size of the cube's y-axis and stores the values in the variables pointed to by start and step respectively.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 633 of file gicube.c.
Referenced by giraffe_cube_save(). |
| cxint giraffe_cube_get_zaxis |
( |
const GiCube * |
self, |
|
|
cxdouble * |
start, |
|
|
cxdouble * |
step |
|
) |
|
|
|
|
Get the data cube's z-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The location where the z-axis start value is stored. |
| step | The location where the z-axis step size is stored. |
- Returns:
- The function returns
0 on success, or a non-zero value in case the cube's axis definition was not found.
The function queries the data cube self for the start value and the step size of the cube's z-axis and stores the values in the variables pointed to by start and step respectively.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 664 of file gicube.c.
Referenced by giraffe_cube_save(). |
| GiCube* giraffe_cube_new |
( |
void |
|
) |
|
|
|
|
Create an empty data cube.
- Returns:
- A pointer to the newly created data cube, or
NULL in case of an error.
The function allocates the memory for a data cube object and initializes it to a valid, empty data cube, i.e. the width, height and depth of the created cube is set to 0. No data buffers are allocated.
Definition at line 270 of file gicube.c. |
| cxint giraffe_cube_save |
( |
const GiCube * |
self, |
|
|
cpl_propertylist * |
properties, |
|
|
const cxchar * |
filename, |
|
|
cxcptr |
data |
|
) |
|
|
| cxint giraffe_cube_set_size |
( |
GiCube * |
self, |
|
|
cxsize |
width, |
|
|
cxsize |
height, |
|
|
cxsize |
depth |
|
) |
|
|
|
|
Set the size of a data cube.
- Parameters:
-
| self | The data cube to query. |
| width | The width to set. |
| height | The height to set. |
| depth | The depth to set. |
- Returns:
- The function returns
0 on success, and a non-zero value otherwise.
The function changes the width, height, and depth of the data cube self to the new values width, height, and depth. Any data the data cube had stored before this function is called are lost, i.e. all data values are reset to 0.
Definition at line 485 of file gicube.c.
References giraffe_error_pop(), and giraffe_error_push(). |
| cxint giraffe_cube_set_xaxis |
( |
GiCube * |
self, |
|
|
cxdouble |
start, |
|
|
cxdouble |
step |
|
) |
|
|
|
|
Set the data cube's x-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The x-axis start value to set. |
| step | The x-axis step size to set. |
- Returns:
- The function returns 0 on success and a non-zero value otherwise.
The function sets the start value and the step size of the x-axis of the data cube self.
Definition at line 690 of file gicube.c. |
| cxint giraffe_cube_set_yaxis |
( |
GiCube * |
self, |
|
|
cxdouble |
start, |
|
|
cxdouble |
step |
|
) |
|
|
|
|
Set the data cube's y-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The y-axis start value to set. |
| step | The y-axis step size to set. |
- Returns:
- The function returns 0 on success and a non-zero value otherwise.
The function sets the start value and the step size of the y-axis of the data cube self.
Definition at line 716 of file gicube.c. |
| cxint giraffe_cube_set_zaxis |
( |
GiCube * |
self, |
|
|
cxdouble |
start, |
|
|
cxdouble |
step |
|
) |
|
|
|
|
Set the data cube's z-axis start value and step size.
- Parameters:
-
| self | The data cube to query. |
| start | The z-axis start value to set. |
| step | The z-axis step size to set. |
- Returns:
- The function returns 0 on success and a non-zero value otherwise.
The function sets the start value and the step size of the z-axis of the data cube self.
Definition at line 742 of file gicube.c. |
|