|
int | BitpixToCfitsioDataType (const int8_t bitpix) |
| Extract category name from PAF key.
|
|
void | GetKeys (std::shared_ptr< CCfits::FITS > &fits_handle, const int16_t hdu_nb, const std::vector< std::string > &keys, std::map< std::string, std::pair< std::string, std::string > > &key_values, const bool ignore_missing_keys) |
|
int8_t | BitpixToBytesPerPixel (const int8_t bitpix) |
| Convert the value of BITPIX into the corresponding bytes per pixel.
|
|
void | LoadImageData (const std::string &filename, const int16_t hdu_nb, ifw::fnd::datatype::DataType &pixel_data_type, void **image_buffer, uint32_t &image_size, std::map< std::string, std::pair< std::string, std::string > > &key_values, const std::list< std::string > &req_keys) |
|
double | DataTypeToBzero (const int fits_data_type) |
| Convert the data type into the corresponding BZERO value.
|
|
void | AppendImageExtension (std::shared_ptr< CCfits::FITS > &fits_handle, const ifw::core::dit::did::Did &dictionary, const std::string &ext_name, const ifw::fnd::fits::BitPix bitpix, const std::vector< int32_t > &naxes, const uint32_t image_size, const void *image_buffer, const uint16_t nb_of_hdr_blocks=1) |
| Append an image extension to the existing FITS file.
|
|
uint16_t | GetNbOfHdus (std::shared_ptr< CCfits::FITS > &fits_handle) |
| Return number of HDUs in the FITS file referenced to by the handle.
|
|
void ifw::ccf::common::fits::LoadImageData |
( |
const std::string & | filename, |
|
|
const int16_t | hdu_nb, |
|
|
ifw::fnd::datatype::DataType & | pixel_data_type, |
|
|
void ** | image_buffer, |
|
|
uint32_t & | image_size, |
|
|
std::map< std::string, std::pair< std::string, std::string > > & | key_values, |
|
|
const std::list< std::string > & | req_keys = std::list< std::string >() ) |
Load the data of the given HDU (1st HDU = 0, dit::fits::CUR_HDU = current header). The function will allocate the buffer to hold the image data. If the HDU contains an image cube, the entire cube is loaded. The application is in charge of free'ing the image buffer when no longer needed. With the "req_keys" parameter, it is possible to specify a selected set of keys to return. Default, a set of basic keys is returned (BITPIX, NAXISi). To have all keys extracted, put the element ALL_KEYS. TODO: "output_bitpix": On-the-fly scaling not provided.