GIRAFFE Pipeline Reference Manual

Image Stack

Functions

GiImageStackgiraffe_imagestack_new (cxint size)
 Create a new GiImageStack.
cxint giraffe_imagestack_resize (GiImageStack *istack, cxint size)
 Non destructive resize of an GiImageStack.
void giraffe_imagestack_delete (GiImageStack *istack)
 Destroys an GiImageStack.
cxint giraffe_imagestack_set (GiImageStack *istack, cxint position, cpl_image *src)
 Stores a reference to a cpl_image in a GiImageStack.
cpl_image * giraffe_imagestack_get (GiImageStack *istack, cxint position)
 Retrieve a cpl_image reference stored in a GiImageStack.
cxint giraffe_imagestack_size (GiImageStack *istack)
 Returns current size of an GiImageStack.

Detailed Description

TBD


Function Documentation

void giraffe_imagestack_delete ( GiImageStack istack  ) 

Destroys an GiImageStack.

Parameters:
istack GiImageStack to destroy

Destroys the GiImageStack istack and frees all associated memory

Definition at line 149 of file giimagestack.c.

References GiImageStack::images, and GiImageStack::nimages.

cpl_image* giraffe_imagestack_get ( GiImageStack istack,
cxint  position 
)

Retrieve a cpl_image reference stored in a GiImageStack.

Parameters:
istack GiImageStack from which to retrieve the reference
position Position of the reference
Returns:
Pointer to a cpl_image if succesful, or NULL if an error occurred

Function returns the reference i.e. pointer contained in the GiImageStack istack at position position and returns it.

Definition at line 233 of file giimagestack.c.

References GiImageStack::images, and GiImageStack::nimages.

GiImageStack* giraffe_imagestack_new ( cxint  size  ) 

Create a new GiImageStack.

Parameters:
size Number of images for which to allocate room for
Returns:
Pointer to newly created GiImageStack or NULL if an error occured

Creates a new GiImageStack with memory allocated for size images

Definition at line 58 of file giimagestack.c.

References GiImageStack::images, and GiImageStack::nimages.

cxint giraffe_imagestack_resize ( GiImageStack istack,
cxint  size 
)

Non destructive resize of an GiImageStack.

Parameters:
istack GiImageStack to resize
size New size
Returns:
==0 if succesful, >0 if an error occurred

Resizes an GiImageStack. In case the new GiImageStack is larger in size than the original GiImageStack, the GiImageStack is grown. All new GiImageStack entries are initialized to NULL. In case the new GiImageStack is smaller than the original, the GiImageStack is shrunk. All superfluous elements are properly disposed off, by calling the destructor for each of them.

Definition at line 91 of file giimagestack.c.

References GiImageStack::images, and GiImageStack::nimages.

cxint giraffe_imagestack_set ( GiImageStack istack,
cxint  position,
cpl_image *  src 
)

Stores a reference to a cpl_image in a GiImageStack.

Parameters:
istack GiImageStack to store the reference to the image in
position Position at which to store the reference
src Image to which reference should point
Returns:
0 if succesful, or a positive number if an error occurred.

Stores a reference i.e. a pointer to the cpl_image src in the GiImageStack istack at position position.

Note:
In case a cpl_image is already stored at the position position make sure you have another reference to this image so you will still be able to access it. This function can not check whether you have one and will simply store the new reference, thereby making the image potentially unreachable (memory leak).

Definition at line 197 of file giimagestack.c.

References GiImageStack::images, and GiImageStack::nimages.

cxint giraffe_imagestack_size ( GiImageStack istack  ) 

Returns current size of an GiImageStack.

Parameters:
istack GiImageStack for which to return the size
Returns:
Maximum number of cpl_image pointers to store in GiImageStack or 0 if an error occured.

Returns the current size of the GiImageStack istack i.e. how many references to a cpl_image are stored/can be stored in it.

Definition at line 267 of file giimagestack.c.

References GiImageStack::nimages.


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