ddt 1.1.0
|
Image IO function declaration. This file is part of the DDT Image Handling Library and provides functions to load / save CPL images. More...
Functions | |
cpl_vector * | LoadCplVector (const char *file_name, long long extension_number) |
cpl_image * | LoadCplImage (const char *file_name, long long plane_number, long long extension_number) |
cpl_image * | CreateCplImage (int width, int height, uint8_t *image_data) |
cpl_image * | CreateCplImage (int width, int height, std::vector< uint8_t > *image_data) |
cpl_image * | CreateCplImage (int width, int height, int16_t *image_data) |
cpl_image * | CreateCplImage (int width, int height, std::vector< int16_t > *image_data) |
cpl_image * | CreateCplImage (const int width, const int height, int32_t *const image_data) |
cpl_image * | CreateCplImage (int width, int height, std::vector< int32_t > *image_data) |
cpl_image * | CreateCplImage (const int width, const int height, float *const image_data) |
cpl_image * | CreateCplImage (int width, int height, std::vector< float > *image_data) |
cpl_image * | CreateCplImage (const int width, const int height, double *const image_data) |
cpl_image * | CreateCplImage (int width, int height, std::vector< double > *image_data) |
cpl_image * | CreateCplImage (const int width, const int height, uint16_t *const image_data) |
cpl_image * | CreateCplImage (const int width, const int height, std::vector< uint16_t > *const image_data) |
cpl_image * | CreateCplImage (const int width, const int height, uint32_t *const image_data) |
cpl_image * | CreateCplImage (const int width, const int height, std::vector< uint32_t > *const image_data) |
bool | SaveCplImage (const cpl_image *image, const char *file_name, cpl_propertylist *property_list) |
void | DeleteCplImage (cpl_image *image) |
void | UnwrapCplImage (cpl_image *image) |
void | DeleteCplPropertyList (cpl_propertylist *const propertylist) |
cpl_type | GetCplImageType (const cpl_image *image) |
int | GetCplImageExtensions (const char *file_name) |
cpl_propertylist * | GetCplImagePropertyList (const char *file_name, int position) |
int | GetCplImagePlanCount (const cpl_propertylist *propertylist) |
cpl_wcs * | GetCplWcs (const cpl_propertylist *propertylist) |
int | GetCplImageBitPix (const cpl_propertylist *const propertylist) |
Image IO function declaration. This file is part of the DDT Image Handling Library and provides functions to load / save CPL images.
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
double *const | image_data | ||
) |
Creates an image from a vector of 32 bit float data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
float *const | image_data | ||
) |
Creates an image from a vector of float data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
int32_t *const | image_data | ||
) |
Creates an image from a vector of 16 bit signed data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
std::vector< uint16_t > *const | image_data | ||
) |
Creates an image from a vector of 16 bit unsigned data. Call function DeleteCplImage to deallocate memory afterwards. Note that the created image has the CPL_TYPE_FLOAT data type.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
std::vector< uint32_t > *const | image_data | ||
) |
Creates an image from a vector of 32 bit unsigned data. Call function DeleteCplImage to deallocate memory afterwards. Note that the created image has the CPL_TYPE_DOUBLE data type.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
uint16_t *const | image_data | ||
) |
Creates an image from a vector of 16 bit unsigned int data. Call function DeleteCplImage to deallocate memory afterwards. Note that the created image has the CPL_TYPE_FLOAT data type.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | const int | width, |
const int | height, | ||
uint32_t *const | image_data | ||
) |
Creates an image from a vector of 32 bit unsigned int data. Call function DeleteCplImage to deallocate memory afterwards. Note that the created image has the CPL_TYPE_DOUBLE data type.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
int16_t * | image_data | ||
) |
Creates an image from a vector of 16 bit signed data. Call function DeleteCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
std::vector< double > * | image_data | ||
) |
Creates an image from a vector of 64 bit double data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
std::vector< float > * | image_data | ||
) |
Creates an image from a vector of 32 bit float data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
std::vector< int16_t > * | image_data | ||
) |
Creates an image from a vector of 16 bit signed data. Call function DeleteCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
std::vector< int32_t > * | image_data | ||
) |
Creates an image from a vector of 32 bit signed data. Call function UnwrapCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
std::vector< uint8_t > * | image_data | ||
) |
Creates an image from a vector of 8 bit unsigned data. Call function DeleteCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
cpl_image * CreateCplImage | ( | int | width, |
int | height, | ||
uint8_t * | image_data | ||
) |
Creates an image from a vector of 8 bit unsigned data. Call function DeleteCplImage to deallocate memory afterwards.
width | the number of columns in the image |
height | the number of lines in the image |
image_data | address of the data vector |
void DeleteCplImage | ( | cpl_image * | image | ) |
Unwraps the image (frees memory associated with the image) and deallocates the pixel buffer
image | CPL image object |
void DeleteCplPropertyList | ( | cpl_propertylist *const | propertylist | ) |
Destroy a property list.
propertylist | the property list to be destroyed |
int GetCplImageBitPix | ( | const cpl_propertylist *const | propertylist | ) |
Get the number of bits per pixel as contained in the property list of a CPL image (FITS). The property list has to be loaded from a certain data set contained in a CPL image.
propertylist | CPL image property list |
int GetCplImageExtensions | ( | const char * | file_name | ) |
Get the number of extensions from a CPL image (FITS).
file_name | Filename of the image to check |
int GetCplImagePlanCount | ( | const cpl_propertylist * | propertylist | ) |
Get the number of planes as contained in the property list of a CPL image (FITS). The property list has to be loaded from a certain data set contained in a CPL image. The function will return following values depending on the number of axis contained: number of axis: 1: -> 0 number of axis: 2: -> 1 number of axis: 3: -> value of property NAXIS3 number of axis > 3: -> -1
propertylist | CPL image property list |
cpl_propertylist * GetCplImagePropertyList | ( | const char * | file_name, |
int | position | ||
) |
Get the property list from one data set of a CPL image (FITS).
file_name | Filename of the image |
position | index of the data set (defaults to 0) |
cpl_type GetCplImageType | ( | const cpl_image * | image | ) |
Get the image type from a CPL image.
image | CPL image object |
cpl_wcs * GetCplWcs | ( | const cpl_propertylist * | propertylist | ) |
Get the WCS structure created by parsing a CPL property list.
propertylist | the input property list |
cpl_image * LoadCplImage | ( | const char * | file_name, |
long long | plane_number, | ||
long long | extension_number | ||
) |
Loads an image from a fits file.
file_name | Filename of the image to load |
plane_number | Plane number in the Data Unit (default 0: first) |
extension_number | Extension number in the file (default 0: primary HDU) |
cpl_vector * LoadCplVector | ( | const char * | file_name, |
long long | extension_number | ||
) |
This file is part of the DDT Image Handling Library and provides functions to load / save CPL images. Loads a vector from a fits file.
file_name | Filename of the image to load |
extension_number | Extension number in the file (default 0: primary HDU) |
bool SaveCplImage | ( | const cpl_image * | image, |
const char * | file_name, | ||
cpl_propertylist * | property_list | ||
) |
Save an image to a fits file.
image | CPL image object |
file_name | Filename of the file to save to |
property_list | list of properties to save to the output header |
void UnwrapCplImage | ( | cpl_image * | image | ) |
Unwraps the image (frees memory associated with the image, except the pixel buffer). The pixel buffer must subsequently be deallocated.
image | CPL image object |