|
|
GiCube * | giraffe_cube_new (void) |
| Create an empty data cube. More...
|
|
GiCube * | giraffe_cube_create (cxsize width, cxsize height, cxsize depth, cxdouble *data) |
| Create a data cube with the given width, height and depth. More...
|
|
void | giraffe_cube_delete (GiCube *self) |
| Destroys a cube object. More...
|
|
cxsize | giraffe_cube_get_width (const GiCube *self) |
| Get the width of the given data cube. More...
|
|
cxsize | giraffe_cube_get_height (const GiCube *self) |
| Get the height of the given data cube. More...
|
|
cxsize | giraffe_cube_get_depth (const GiCube *self) |
| Get the depth of the given data cube. More...
|
|
cxsize | giraffe_cube_get_size (const GiCube *self) |
| Get the size of the given data cube. More...
|
|
cxint | giraffe_cube_set_size (GiCube *self, cxsize width, cxsize height, cxsize depth) |
| Set the size of a data cube. More...
|
|
cxdouble * | giraffe_cube_get_data (const GiCube *self) |
| Get a reference to the data cube's pixel buffer. More...
|
|
cxbool | giraffe_cube_has_xaxis (const GiCube *self) |
| Check whether an x-axis is defined for the given cube. More...
|
|
cxbool | giraffe_cube_has_yaxis (const GiCube *self) |
| Check whether a y-axis is defined for the given cube. More...
|
|
cxbool | giraffe_cube_has_zaxis (const GiCube *self) |
| Check whether a z-axis is defined for the given cube. More...
|
|
cxbool | giraffe_cube_has_wcs (const GiCube *self) |
| Check whether a world coordinate system is defined for the given cube. More...
|
|
cxint | giraffe_cube_get_xaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| Get the data cube's x-axis start value and step size. More...
|
|
cxint | giraffe_cube_get_yaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| Get the data cube's y-axis start value and step size. More...
|
|
cxint | giraffe_cube_get_zaxis (const GiCube *self, cxdouble *start, cxdouble *step) |
| Get the data cube's z-axis start value and step size. More...
|
|
cxint | giraffe_cube_set_xaxis (GiCube *self, cxdouble start, cxdouble step) |
| Set the data cube's x-axis start value and step size. More...
|
|
cxint | giraffe_cube_set_yaxis (GiCube *self, cxdouble start, cxdouble step) |
| Set the data cube's y-axis start value and step size. More...
|
|
cxint | giraffe_cube_set_zaxis (GiCube *self, cxdouble start, cxdouble step) |
| Set the data cube's z-axis start value and step size. More...
|
|
void | giraffe_cube_clear_wcs (GiCube *self) |
| Remove the world coordinate system from the cube. More...
|
|
cxint | giraffe_cube_set_wcs (GiCube *self, const cpl_propertylist *axes, const cpl_matrix *transformation) |
| Set the data cube's world coordinate system. More...
|
|
cxint | giraffe_cube_sqrt (GiCube *self) |
| Compute the square root of the elements of a cube. More...
|
|
cpl_image * | giraffe_cube_integrate (const GiCube *self, cxdouble start, cxdouble end) |
| Integrate a cube along the z-axis. More...
|
|
cxint | giraffe_cube_save (const GiCube *self, cpl_propertylist *properties, const cxchar *filename, cxcptr data) |
| Save the given data cube to disk. More...
|
|
TBD
void giraffe_cube_clear_wcs |
( |
GiCube * |
self | ) |
|
Remove the world coordinate system from the cube.
- Parameters
-
self | The data cube to modify. |
- Returns
- Nothing.
The function removes the world coordinate system information from the data cube self. If a cube does not have any world coordinate system set, calling this function has no effect.
Definition at line 1001 of file gicube.c.
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 455 of file gicube.c.
void giraffe_cube_delete |
( |
GiCube * |
self | ) |
|
Destroys a cube object.
- Parameters
-
self | The data cube object to delete. |
- Returns
- Nothing.
The function destroys the data cube self, and all its contents.
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.
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 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.
The function retrieves the current depth, i.e. the size along the z-axis, of the given 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.
The function retrieves the current height, i.e. the size along the y-axis, of the given 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.
The function retrieves the current size, i.e. the total number of pixels (data values), of the given 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.
The function retrieves the current width, i.e. the size along the x-axis, of the given 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.
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 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.
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 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.
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 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, or FALSE if no world coordinate system was previously defined.
The function checks whether giraffe_cube_set_wcs() was previously called for the cube self.
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, or FALSE if no x-axis was previously defined.
The function checks whether giraffe_cube_set_xaxis() was previously called for the cube self.
Definition at line 746 of file gicube.c.
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, or FALSE if no y-axis was previously defined.
The function checks whether giraffe_cube_set_yaxis() was previously called for the cube self.
Definition at line 767 of file gicube.c.
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, or FALSE if no z-axis was previously defined.
The function checks whether giraffe_cube_set_zaxis() was previously called for the cube self.
Definition at line 788 of file gicube.c.
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.
For each pixel of the cube in the xy-plane, the function integrates the values stored in this pixel of the data cube along the z-axis. The integration domain is given by start and end.
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.
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 420 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 635 of file gicube.c.
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.
The function sets a world coordinate system (WCS) for the cube self. Only linear transformations are supported, i.e transformations which can be expressed as a matrix. This transformation matrix is then given by the three by three matrix transformation. The origin of the WCS, its reference point in cube coordinates (pixel coordinates), the axis types and axis units are given by the property list axes. To be valid this property list must provide the axis description for each of the three axes (X, Y, and Z) of the cube. The reference pixel in cube coordinates is given by the three double properties [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.
The function sets the start value and the step size of the x-axis of the data cube self.
Definition at line 924 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 950 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 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.
The function sets the start value and the step size of the z-axis of the data cube self.
Definition at line 976 of file gicube.c.
cxint giraffe_cube_sqrt |
( |
GiCube * |
self | ) |
|
Compute the square root of the elements of a cube.
- Parameters
-
- Returns
- The function returns
0 if no error occurs, otherwise a non-zero value is returned.
The square root of each pixel of the cube is computed.
Definition at line 1099 of file gicube.c.
Referenced by giraffe_fov_build().
|