Data Cube 3d Handling functions
[Data Format Handling functions]

Functions

static void xsh_image_3d_write_fits_header (fitsfile *fptr, cpl_propertylist *header)
xsh_image_3dxsh_image_3d_new (int nx, int ny, int nz, cpl_type type)
cpl_error_code xsh_image_3d_insert (xsh_image_3d *img_3d, cpl_image *img, int iz)
xsh_image_3dxsh_image_3d_load (const char *filename, cpl_type type, int xtnum)
cpl_error_code xsh_image_3d_save (xsh_image_3d *img_3d, const char *fname, cpl_propertylist *header, unsigned mode)
int xsh_image_3d_get_size_x (xsh_image_3d *img_3d)
int xsh_image_3d_get_size_y (xsh_image_3d *img_3d)
int xsh_image_3d_get_size_z (xsh_image_3d *img_3d)
void * xsh_image_3d_get_data (xsh_image_3d *img_3d)
cpl_type xsh_image_3d_get_type (xsh_image_3d *img_3d)
void xsh_image_3d_free (xsh_image_3d **img_3d)

Function Documentation

void xsh_image_3d_free ( xsh_image_3d **  img_3d  ) 

Definition at line 512 of file xsh_data_image_3d.c.

References XSH_FREE.

Referenced by xsh_pre_3d_free().

void* xsh_image_3d_get_data ( xsh_image_3d img_3d  ) 

Definition at line 489 of file xsh_data_image_3d.c.

References xsh_image_3d::pixels, and XSH_ASSURE_NOT_NULL.

Referenced by main(), xsh_center_cube(), and xsh_image_3d_insert().

int xsh_image_3d_get_size_x ( xsh_image_3d img_3d  ) 
int xsh_image_3d_get_size_y ( xsh_image_3d img_3d  ) 
int xsh_image_3d_get_size_z ( xsh_image_3d img_3d  ) 
cpl_type xsh_image_3d_get_type ( xsh_image_3d img_3d  ) 

Definition at line 500 of file xsh_data_image_3d.c.

References xsh_image_3d::type, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_image_3d_insert().

cpl_error_code xsh_image_3d_insert ( xsh_image_3d img_3d,
cpl_image *  img,
int  iz 
)

Insert a 2D image into a data cube at the proper Z axis place.

Parameters:
img_3d The data cube
img The 2D image to be inserted into the data cube
iz The Z axis value where the image shall be inserted
Returns:
An error code (CPL_ERROR_NONE if OK)

Definition at line 236 of file xsh_data_image_3d.c.

References check, nx, ny, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_image_3d_get_data(), xsh_image_3d_get_size_x(), xsh_image_3d_get_size_y(), xsh_image_3d_get_size_z(), xsh_image_3d_get_type(), xsh_msg_dbg_high, and xsh_msg_error.

Referenced by main(), and make_data_cube().

xsh_image_3d* xsh_image_3d_load ( const char *  filename,
cpl_type  type,
int  xtnum 
)
xsh_image_3d* xsh_image_3d_new ( int  nx,
int  ny,
int  nz,
cpl_type  type 
)

Create a new data cube. Initialized with zeroes. Actually this (and other functions should be available in CPL, should'nt they ?

Parameters:
nx First (X) axis size
ny Second (Y) axis size
nz Third (Z) axis size
type Type of the image
Returns:
The created data cube

Definition at line 201 of file xsh_data_image_3d.c.

References check, xsh_image_3d::nx, xsh_image_3d::ny, xsh_image_3d::nz, xsh_image_3d::pixels, xsh_image_3d::type, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, xsh_msg_dbg_high, and xsh_msg_dbg_low.

Referenced by main(), xsh_image_3d_load(), and xsh_pre_3d_new().

cpl_error_code xsh_image_3d_save ( xsh_image_3d img_3d,
const char *  fname,
cpl_propertylist *  header,
unsigned  mode 
)

Save the data cube image. Note that the output file is automatically rewritten if it exists.

Parameters:
img_3d Input Data Cube
fname Output file name
header FITS Header
mode saving mode (default/extend)
Returns:
Possible error code

Definition at line 376 of file xsh_data_image_3d.c.

References check, xsh_image_3d::pixels, size, xsh_image_3d::type, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_image_3d_get_size_x(), xsh_image_3d_get_size_y(), xsh_image_3d_get_size_z(), xsh_image_3d_write_fits_header(), xsh_msg_dbg_high, and xsh_msg_dbg_low.

Referenced by main().

static void xsh_image_3d_write_fits_header ( fitsfile *  fptr,
cpl_propertylist *  header 
) [static]

< Current property

Definition at line 50 of file xsh_data_image_3d.c.

References s, XSH_ASSURE_NOT_ILLEGAL, and xsh_msg.

Referenced by xsh_image_3d_save().


Generated on 13 Mar 2013 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1