IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 17, 2007, 4:56:36 PM (19 years ago)
Author:
jhoblitt
Message:

add psFitsOptionsAlloc()
add psFitsSetOptions()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFits.c

    r14876 r14877  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-09-18 02:33:48 $
     9 *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-09-18 02:56:36 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    182182}
    183183
     184static void psFitsOptionsFree(psFitsOptions *opt)
     185{
     186    psFree(opt->tilesize);
     187}
     188
     189psFitsOptions* psFitsOptionsAlloc(
     190    psFitsCompressionType type,         ///< type of compression
     191    psVector *tilesize,                 ///< vector defining compression tile size
     192    int noisebits,                      ///< noise bits
     193    int scale,                          ///< hcompress scale
     194    int smooth                          ///< hcompress smothing
     195)
     196{
     197    psFitsOptions *opt = psAlloc(sizeof(psFitsOptions));
     198
     199    opt->type = type;
     200    opt->tilesize = tilesize;
     201    opt->noisebits = noisebits;
     202    opt->scale = scale;
     203    opt->smooth = smooth;
     204
     205    psMemSetDeallocator(opt, (psFreeFunc) psFitsOptionsFree);
     206
     207    return opt;
     208}
     209
    184210bool psMemCheckFits(psPtr ptr)
    185211{
     
    656682
    657683
     684bool psFitsSetOptions(
     685    psFits* fits,                       ///< psFits object to close
     686    psFitsOptions *opt                  ///< options object
     687)
     688{
     689    return psFitsSetCompression(
     690            fits,
     691            opt->type,
     692            opt->tilesize,
     693            opt->noisebits,
     694            opt->scale,
     695            opt->smooth);
     696}
     697
     698
    658699psDataType p_psFitsTypeFromCfitsio(int datatype)
    659700{
Note: See TracChangeset for help on using the changeset viewer.