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. | |
| cxbool | giraffe_cube_has_xaxis (const GiCube *self) |
| Check whether an x-axis is defined for the given cube. | |
| cxbool | giraffe_cube_has_yaxis (const GiCube *self) |
| Check whether a y-axis is defined for the given cube. | |
| cxbool | giraffe_cube_has_zaxis (const GiCube *self) |
| Check whether a z-axis is defined for the given cube. | |
| 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_sqrt (GiCube *self) |
| Compute the square root of the elements of a cube. | |
| cpl_image * | giraffe_cube_integrate (const GiCube *self, cxdouble start, cxdouble end) |
| Integrate a cube along the z-axis. | |
| cxint | giraffe_cube_save (const GiCube *self, cpl_propertylist *properties, const cxchar *filename, cxcptr data) |
| Save the given data cube to disk. | |
Detailed Description
TBDFunction 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
NULLin case of an error.
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 315 of file gicube.c.
References giraffe_error_pop(), and giraffe_error_push().
| void giraffe_cube_delete | ( | GiCube * | self | ) |
Destroys a cube object.
- Parameters:
-
self The data cube object to delete.
- Returns:
- Nothing.
Definition at line 372 of file gicube.c.
Referenced by giraffe_fov_build(), and giraffe_fov_clear().
| 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
NULLif the cube does not contain any data, or an error occurred.
Definition at line 575 of file gicube.c.
Referenced by giraffe_cube_save().
| 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.
Definition at line 444 of file gicube.c.
Referenced by giraffe_cube_integrate().
| cxsize giraffe_cube_get_height | ( | const GiCube * | self | ) |
| 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.
Definition at line 467 of file gicube.c.
Referenced by giraffe_cube_save().
| cxsize giraffe_cube_get_width | ( | const GiCube * | self | ) |
| 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
0on success, or a non-zero value in case the cube's axis definition was not found.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 675 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
0on success, or a non-zero value in case the cube's axis definition was not found.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 706 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
0on success, or a non-zero value in case the cube's axis definition was not found.
If either start or step is a NULL pointer, the corresponding value is not returned.
Definition at line 737 of file gicube.c.
Referenced by giraffe_cube_save().
| cxbool giraffe_cube_has_xaxis | ( | const GiCube * | self | ) |
Check whether an x-axis is defined for the given cube.
- Parameters:
-
self The data cube to be checked.
- Returns:
- The function returns
TRUEif an x-axis is defined, orFALSEif no x-axis was previously defined.
| cxbool giraffe_cube_has_yaxis | ( | const GiCube * | self | ) |
Check whether a y-axis is defined for the given cube.
- Parameters:
-
self The data cube to be checked.
- Returns:
- The function returns
TRUEif an y-axis is defined, orFALSEif no y-axis was previously defined.
| cxbool giraffe_cube_has_zaxis | ( | const GiCube * | self | ) |
Check whether a z-axis is defined for the given cube.
- Parameters:
-
self The data cube to be checked.
- Returns:
- The function returns
TRUEif an z-axis is defined, orFALSEif no z-axis was previously defined.
| cpl_image* giraffe_cube_integrate | ( | const GiCube * | self, | |
| cxdouble | start, | |||
| cxdouble | end | |||
| ) |
Integrate a cube along the z-axis.
- Parameters:
-
self The data cube. start The start of the integration domain. end The end of the integration domain.
- Returns:
- On success, an image of the integrated data values of the cube is returned. If an error occurs
NULLis returned.
The positions of the pixels in the returned image correspond to the xy-plane of the cube. The integrated pixel values are the sum of the cube elements along the z-axis which are greater than start and less than end. If start or end are not integer numbers, the integration takes the pixel fractions into account.
The value end must be greater than start, start must be greater or equal zero, and end must be less or equal the depth of the cube as returned by giraffe_cube_get_depth().
Definition at line 890 of file gicube.c.
References giraffe_cube_get_depth().
| GiCube* giraffe_cube_new | ( | void | ) |
Create an empty data cube.
- Returns:
- A pointer to the newly created data cube, or
NULLin case of an error.
0. No data buffers are allocated.
| cxint giraffe_cube_save | ( | const GiCube * | self, | |
| cpl_propertylist * | properties, | |||
| const cxchar * | filename, | |||
| cxcptr | data | |||
| ) |
Save the given data cube to disk.
- Parameters:
-
self The cube to write to disk. properties The property list to write. filename The name of the file to write. data Extra data (unused).
- Returns:
- The function returns
0on success, or a non-zero value if an error occurred. In the latter case an appropriate error code is also set.
Definition at line 984 of file gicube.c.
References giraffe_cube_get_data(), giraffe_cube_get_size(), giraffe_cube_get_xaxis(), giraffe_cube_get_yaxis(), giraffe_cube_get_zaxis(), giraffe_error_pop(), giraffe_error_push(), and giraffe_propertylist_update_wcs().
Referenced by giraffe_fov_save_cubes().
| 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
0on success, and a non-zero value otherwise.
0.
Definition at line 495 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.
| 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.
| 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.
| cxint giraffe_cube_sqrt | ( | GiCube * | self | ) |
Compute the square root of the elements of a cube.
- Parameters:
-
self The cube
- Returns:
- The function returns
0if no error occurs, otherwise a non-zero value is returned.
Definition at line 839 of file gicube.c.
Referenced by giraffe_fov_build().
