00001 /** @file psFitsImage.h 00002 * 00003 * @brief Contains Fits I/O routines 00004 * 00005 * @ingroup FileIO 00006 * 00007 * @author Robert DeSonia, MHPCC 00008 * 00009 * @version $Revision: 1.4 $ $Name: rel12 $ 00010 * @date $Date: 2006/06/13 22:28:02 $ 00011 * 00012 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 00013 */ 00014 00015 #ifndef PS_FITSIMAGE_H 00016 #define PS_FITSIMAGE_H 00017 00018 #include "psFits.h" 00019 00020 #include "psType.h" 00021 #include "psArray.h" 00022 #include "psVector.h" 00023 #include "psMetadata.h" 00024 #include "psImage.h" 00025 00026 /// @addtogroup FileIO 00027 /// @{ 00028 00029 /** Reads an image, given the desired region and z-plane. 00030 * 00031 * @return psImage* the read image or NULL if there was an error. 00032 */ 00033 psImage* psFitsReadImage( 00034 const psFits* fits, ///< the psFits object 00035 psRegion region, ///< the region in the FITS image to read 00036 int z ///< the z-plane in the FITS image cube to read 00037 ); 00038 00039 /** Writes an image, given the desired region and z-plane. 00040 * 00041 * @return bool TRUE is the write was successful, otherwise FALSE. 00042 */ 00043 bool psFitsWriteImage( 00044 psFits* fits, ///< the psFits object 00045 const psMetadata* header, ///< header items for the new HDU. Can be NULL. 00046 const psImage* input, ///< the image to output 00047 int depth, ///< the number of z-planes of the FITS image data cube 00048 const char* extname ///< FITS extension name 00049 ); 00050 00051 /** Writes an image, given the desired region and z-plane. A new IMAGE HDU is 00052 * appended to the end of the FITS file. 00053 * 00054 * @return bool TRUE is the write was successful, otherwise FALSE. 00055 */ 00056 bool psFitsInsertImage( 00057 psFits* fits, ///< the psFits object 00058 const psMetadata* header, ///< header items for the new HDU. Can be NULL. 00059 const psImage* input, ///< the image to output 00060 int depth, ///< the number of z-planes of the FITS image data cube 00061 const char* extname, ///< FITS extension name 00062 bool after ///< if TRUE, inserts HDU after current HDU, otherwise before 00063 ); 00064 00065 /** Updates the FITS file image, given the desired region and z-plane. a new 00066 * IMAGE HDU is inserted before or after, depending on the AFTER parameter, 00067 * the current HDU. 00068 * 00069 * @return bool TRUE is the write was successful, otherwise FALSE. 00070 */ 00071 bool psFitsUpdateImage( 00072 psFits* fits, ///< the psFits object 00073 const psImage* input, ///< the image to output 00074 int x0, ///< psImage's x-axis origin in FITS image coordinates 00075 int y0, ///< psImage's y-axis origin in FITS image coordinates 00076 int z ///< the z-planes of the FITS image data cube to write 00077 ); 00078 00079 psArray *psFitsReadImageCube(const psFits *fits, psRegion region); 00080 bool psFitsWriteImageCube(psFits *fits, psMetadata *header, const psArray *input, const char *extname); 00081 bool psFitsUpdateImageCube(psFits *fits, const psArray *input, int x0, int y0); 00082 00083 /// @} 00084 00085 #endif // #ifndef PS_FITS_H
1.4.4