IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37855


Ignore:
Timestamp:
Jan 17, 2015, 5:56:08 AM (12 years ago)
Author:
eugene
Message:

add CreateBuffer3D

Location:
branches/eam_branches/ipp-20150112/Ohana/src/opihi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/Ohana/src/opihi/include/dvomath.h

    r37807 r37855  
    187187int           ListBuffersToList     PROTO((char *name));
    188188int           CreateBuffer          PROTO((Buffer *buf, int Nx, int Ny, int bitpix, float bzero, float bscale));
     189int           CreateBuffer3D        PROTO((Buffer *buf, int Nx, int Ny, int Nz, int bitpix, float bzero, float bscale));
    189190int           ResetBuffer           PROTO((Buffer *buf, int Nx, int Ny, int bitpix, float bzero, float bscale));
    190191Buffer       *SelectBuffer          PROTO((char *name, int mode, int verbose));
  • branches/eam_branches/ipp-20150112/Ohana/src/opihi/lib.shell/BufferOps.c

    r37807 r37855  
    120120}
    121121 
     122int CreateBuffer3D (Buffer *buf, int Nx, int Ny, int Nz, int bitpix, float bzero, float bscale) {
     123
     124  /* store the default output values */
     125  gfits_init_header (&buf[0].header);
     126
     127  /* assign the necessary internal values */
     128  buf[0].header.bitpix   = -32;
     129  buf[0].header.Naxes = 3;
     130  buf[0].header.Naxis[0] = Nx;
     131  buf[0].header.Naxis[1] = Ny;
     132  buf[0].header.Naxis[2] = Nz;
     133
     134  buf[0].bitpix = bitpix;
     135  buf[0].bzero  = bzero;
     136  buf[0].bscale = bscale;
     137 
     138  /* make some test of the validity of the values */
     139
     140  /* create the appropriate header and matrix */
     141  gfits_create_header (&buf[0].header);
     142  gfits_create_matrix (&buf[0].header, &buf[0].matrix);
     143
     144  return (TRUE);
     145}
     146 
    122147/* copy data from in to out - new memory space */
    123148int CopyNamedBuffer (char *out, char *in) {
Note: See TracChangeset for help on using the changeset viewer.