Image Stack
Functions | |
GiImageStack * | giraffe_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
TBDFunction Documentation
void giraffe_imagestack_delete | ( | GiImageStack * | istack | ) |
Destroys an GiImageStack.
- Parameters:
-
istack GiImageStack to destroy
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
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
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
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.
- 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.
Definition at line 267 of file giimagestack.c.
References GiImageStack::nimages.