Data Cube
Typedefs | |
typedef enum GiCubeAxes | GiCubeAxes |
typedef GiCubeAxis | GiCubeAxis |
typedef GiCubeWCS | GiCubeWCS |
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. | |
cxbool | giraffe_cube_has_wcs (const GiCube *self) |
Check whether a world coordinate system 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. | |
void | giraffe_cube_clear_wcs (GiCube *self) |
Remove the world coordinate system from the cube. | |
cxint | giraffe_cube_set_wcs (GiCube *self, const cpl_propertylist *axes, const cpl_matrix *transformation) |
Set the data cube's world coordinate system. | |
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
void giraffe_cube_clear_wcs | ( | GiCube * | self | ) |
Remove the world coordinate system from the cube.
- Parameters:
-
self The data cube to modify.
- Returns:
- Nothing.
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.
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 455 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 512 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
NULL
if the cube does not contain any data, or an error occurred.
Definition at line 715 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 584 of file gicube.c.
Referenced by giraffe_cube_integrate().
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.
Definition at line 561 of file gicube.c.
Referenced by giraffe_fov_build().
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 607 of file gicube.c.
Referenced by giraffe_cube_save().
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.
Definition at line 538 of file gicube.c.
Referenced by giraffe_fov_build().
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.
If either start or step is a NULL
pointer, the corresponding value is not returned.
Definition at line 836 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.
If either start or step is a NULL
pointer, the corresponding value is not returned.
Definition at line 867 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.
If either start or step is a NULL
pointer, the corresponding value is not returned.
Definition at line 898 of file gicube.c.
Referenced by giraffe_cube_save(), and giraffe_fov_build().
cxbool giraffe_cube_has_wcs | ( | const GiCube * | self | ) |
Check whether a world coordinate system is defined for the given cube.
- Parameters:
-
self The data cube to be checked.
- Returns:
- The function returns
TRUE
if a world coordinate system is defined, orFALSE
if no world coordinate system was previously defined.
Definition at line 809 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
TRUE
if an x-axis is defined, orFALSE
if 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
TRUE
if an y-axis is defined, orFALSE
if 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
TRUE
if an z-axis is defined, orFALSE
if 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
NULL
is 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 1150 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
NULL
in 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
0
on success, or a non-zero value if an error occurred. In the latter case an appropriate error code is also set.
Definition at line 1244 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_cube_has_wcs(), giraffe_error_pop(), giraffe_error_push(), and giraffe_propertylist_update_wcs().
Referenced by giraffe_fov_save_cubes(), and giraffe_fov_save_cubes_eso3d().
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.
0
.
Definition at line 635 of file gicube.c.
References giraffe_error_pop(), and giraffe_error_push().
cxint giraffe_cube_set_wcs | ( | GiCube * | self, | |
const cpl_propertylist * | axes, | |||
const cpl_matrix * | transformation | |||
) |
Set the data cube's world coordinate system.
- Parameters:
-
self The data cube to modify. axes Axes properties of the WCS axes transformation Transformation matrix from cube coordinates to WCS coordinates
- Returns:
- The function returns 0 on success and a non-zero value otherwise.
[XYZ]ORIGIN, and the associated WCS coordinates by the three double properties
[XYZ]POINT. The axis type and the axis unit are given by the string properties
[XYZ]TYPE and
[XYZ]UNIT, respectively.
Definition at line 1040 of file gicube.c.
Referenced by giraffe_fov_build().
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 modify. 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
0
if no error occurs, otherwise a non-zero value is returned.
Definition at line 1099 of file gicube.c.
Referenced by giraffe_fov_build().