GIRAFFE Pipeline Reference Manual

Data Cube

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

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 315 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 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 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 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.

The function retrieves the current depth, i.e. the size along the z-axis, of the given data cube self.

Definition at line 444 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 421 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 467 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 398 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 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 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 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 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 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 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 606 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 627 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 648 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 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 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 280 of file gicube.c.

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.

The function writes the property list properties and the associated data cube self to the file filename.

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(), and giraffe_cube_get_zaxis().

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 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 495 of file gicube.c.

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 763 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 789 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 815 of file gicube.c.

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.

The square root of each pixel of the cube is computed.

Definition at line 839 of file gicube.c.

Referenced by giraffe_fov_build().


This file is part of the GIRAFFE Pipeline Reference Manual 2.9.0.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Jan 26 14:20:30 2012 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004