The VisAO Camera
visaoimutils.h File Reference

Declarations for various image utility functions. More...

#include <stdio.h>
#include <fitsio.h>
#include <sys/time.h>
#include <time.h>
#include "libvisao.h"
#include "sharedim_stack.h"
#include "statusboard.h"

Go to the source code of this file.

Classes

struct  visao_imheader
 

Macros

#define INT_2BYTES   short
 

Functions

void init_visao_imheader (visao_imheader *imhead)
 
int get_visao_filename (char *buffer, struct timeval *tv)
 Writes the standard visao unique filename for a timeval to the buffer. More...
 
int get_visao_filename (char *buffer, struct timespec *ts)
 Writes the standard visao unique filename for a timespec to the buffer. More...
 
template<class dataT >
int visao_fits_create_img (fitsfile *fptr, int naxis, long *naxes, int *status)
 
template<class dataT >
int visao_fits_write_subset (fitsfile *fptr, long *fpixel, long *lpixel, dataT *array, int *status)
 
template<class dataT >
int write_visao_fits (const char *foutname, int nx, int ny, dataT *im, visao_imheader *head, bool aohead, bool visaohead)
 Write a fits file.
 
template<class dataT >
int write_visao_fits (const char *name_base, sharedim< dataT > *sim, visao_imheader *head, bool aohead=true, bool visaohead=true)
 Write a fits file, using the sharedim structure.
 
int write_visao_raw (const char *name_base, sharedimS *sim, visao_imheader *head, bool aohead=true, bool visaohead=true)
 
int write_visao_fits_aosys_header (fitsfile *outfptr, visao_imheader *head)
 
int write_visao_fits_visao_header (fitsfile *outfptr, visao_imheader *head)
 
int get_fits_im (unsigned char *im, long hduno, long *fpix, long *lpix, fitsfile **fptr, const char *fname)
 
int get_fits_im (float *im, long hduno, long *fpix, long *lpix, fitsfile **fptr, const char *fname)
 
int get_fits_im (double *im, long hduno, long *fpix, long *lpix, fitsfile **fptr, const char *fname)
 

Detailed Description

Author
Jared R. Males

Definition in file visaoimutils.h.

Function Documentation

int get_visao_filename ( char *  buffer,
struct timeval tv 
)

YYYYMODDHHMMSSUUUUUU where YYYY = the 4 digit year MO = the 2 digit month DD = the 2 digit day HH = the 2 digit hour MM = the 2 digit minut SS = the 2 digit second UUUUUU = the 6 digit microsecond

Parameters
bufferpointer to be written to, must be allocated to at least 21
tvis the time to use to construct the filename.
Return values
0on success.
-1on failure in gmtime_r.

Definition at line 39 of file visaoimutils.cpp.

Referenced by VisAO::ShutterControlDioclient::getDataFileName(), and write_visao_fits().

int get_visao_filename ( char *  buffer,
struct timespec *  ts 
)

YYYYMODDHHMMSSUUUUUU where YYYY = the 4 digit year MO = the 2 digit month DD = the 2 digit day HH = the 2 digit hour MM = the 2 digit minut SS = the 2 digit second UUUUUU = the 6 digit microsecond

Parameters
bufferpointer to be written to, must be allocated to at least 21
tsis the time to use to construct the filename.
Return values
0on success.
-1on failure in gmtime_r.

Definition at line 57 of file visaoimutils.cpp.