IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4315


Ignore:
Timestamp:
Jun 17, 2005, 4:30:50 PM (21 years ago)
Author:
drobbin
Message:

* empty log message *

Location:
trunk/psLib/src
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psHash.c

    r4136 r4315  
    1212*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-06-07 22:37:52 $
     14*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-06-18 02:30:49 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4343    The linked list
    4444 *****************************************************************************/
    45 psList* psHashKeyList(psHash* table)
     45psList* psHashKeyList(const psHash* hash)
    4646{
    4747    psS32 i = 0;                  // Loop index variable
     
    4949    psHashBucket* ptr = NULL;   // Used to step thru linked list.
    5050
    51     if (table == NULL) {
     51    if (hash == NULL) {
    5252        return NULL;
    5353    }
     
    5757    // Loop through every bucket in the hash table.  If that bucket is not
    5858    // NULL, then add the bucket's key to the linked list.
    59     for (i = 0; i < table->nbucket; i++) {
    60         if (table->buckets[i] != NULL) {
     59    for (i = 0; i < hash->nbucket; i++) {
     60        if (hash->buckets[i] != NULL) {
    6161            // Since a bucket contains a linked list of keys/data, we must
    6262            // step trough each key in that linked list:
    6363
    64             ptr = table->buckets[i];
     64            ptr = hash->buckets[i];
    6565            while (ptr != NULL) {
    6666                psListAdd(myLinkList, PS_LIST_HEAD, ptr->key);
     
    135135    The new hash table.
    136136 *****************************************************************************/
    137 psHash* psHashAlloc(psS32 nbucket)        // initial number of buckets
     137psHash* psHashAlloc(long nalloc)        // initial number of buckets
    138138{
    139139    psS32 i = 0;                  // loop index variable
     
    145145
    146146    // Allocate memory for the buckets.
    147     table->buckets = psAlloc(nbucket * sizeof(psHashBucket* ));
    148     table->nbucket = nbucket;
    149 
    150     psTrace("utils.hash", 1, "Creating %d-element hash table\n", nbucket);
     147    table->buckets = psAlloc(nalloc * sizeof(psHashBucket* ));
     148    table->nbucket = nalloc;
     149
     150    psTrace("utils.hash", 1, "Creating %d-element hash table\n", nalloc);
    151151
    152152    // Initialize all buckets to NULL.
    153     for (i = 0; i < nbucket; i++)
     153    for (i = 0; i < nalloc; i++)
    154154    {
    155155        table->buckets[i] = NULL;
     
    383383    boolean value defining success or failure
    384384 *****************************************************************************/
    385 psBool psHashRemove(psHash* table,
    386                     const char *key)
     385bool psHashRemove(psHash* table,
     386                  const char *key)
    387387{
    388388    psPtr data = NULL;
  • trunk/psLib/src/collections/psHash.h

    r4162 r4315  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-08 23:40:45 $
     13 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-18 02:30:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747/// Allocate hash buckets in table.
    4848psHash* psHashAlloc(
    49     psS32 nbucket                  ///< The number of buckets to allocate.
     49    long nalloc                        ///< The number of buckets to allocate.
    5050);
    5151
    5252/// Insert entry into table.
    5353psBool psHashAdd(
    54     psHash* table,                 ///< The table to insert in.
    55     const char *key,               ///< The key to use.
    56     psPtr data                     ///< The data to insert.
     54    psHash* table,                     ///< The table to insert in.
     55    const char *key,                   ///< The key to use.
     56    psPtr data                         ///< The data to insert.
    5757);
    5858
    5959/// Lookup key in table.
    6060psPtr psHashLookup(
    61     psHash* table,                 ///< The table to lookup key in.
    62     const char *key                ///< The key to lookup.
     61    psHash* table,                     ///< The table to lookup key in.
     62    const char *key                    ///< The key to lookup.
    6363);
    6464
    6565/// Remove key from table.
    66 psBool psHashRemove(
    67     psHash* table,                 ///< The table to lookup key in.
    68     const char *key                ///< The key to lookup.
     66bool psHashRemove(
     67    psHash* table,                     ///< The table to lookup key in.
     68    const char *key                    ///< The key to lookup.
    6969);
    7070
    7171/// List all keys in table.
    7272psList* psHashKeyList(
    73     psHash* table                  ///< The table to list keys from..
     73    const psHash* hash                 ///< The table to list keys from..
    7474);
    7575
     
    7979 */
    8080psArray* psHashToArray(
    81     psHash* table                  ///< The table to convert to psArray.
     81    psHash* table                 ///< The table to convert to psArray.
    8282);
    8383
  • trunk/psLib/src/dataIO/psFits.c

    r4308 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 23:44:21 $
     9 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    357357}
    358358
    359 bool psFitsSetExtName(const psFits* fits, const char* name)
     359bool psFitsSetExtName(psFits* fits, const char* name)
    360360{
    361361    if (fits == NULL) {
     
    881881}
    882882
    883 bool psFitsUpdateImage(const psFits* fits,
     883bool psFitsUpdateImage(psFits* fits,
    884884                       const psImage* input,
    885885                       psRegion region,
     
    10191019}
    10201020
    1021 bool psFitsWriteHeader(const psMetadata* header,
     1021bool psFitsWriteHeader(const psMetadata* output,
    10221022                       const psFits* fits)
    10231023{
     
    10291029    }
    10301030
    1031     if (header == NULL) {
     1031    if (output == NULL) {
    10321032        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    10331033                PS_ERRORTEXT_psFits_METADATA_NULL);
     
    10391039    //transverse the metadata list and add each key.
    10401040
    1041     psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD,true);
     1041    psListIterator* iter = psListIteratorAlloc(output->list,PS_LIST_HEAD,true);
    10421042    psMetadataItem* item;
    10431043    while ( (item=psListGetAndIncrement(iter)) != NULL ) {
     
    13971397
    13981398
    1399 psArray* psFitsReadTable(const psFits* fits)
     1399psArray* psFitsReadTable(psFits* fits)
    14001400{
    14011401    int status = 0;
  • trunk/psLib/src/dataIO/psFits.h

    r4308 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 23:44:21 $
     9 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    104104 */
    105105bool psFitsSetExtName(
    106     const psFits* fits,                ///< the psFits object
     106    psFits* fits,                      ///< the psFits object
    107107    const char* name                   ///< the extension name
    108108);
     
    155155 */
    156156bool psFitsWriteHeader(
    157     const psMetadata* header,          ///< the psMetadata data in which to write
     157    const psMetadata* output,          ///< the psMetadata data in which to write
    158158    const psFits* fits                 ///< the psFits object
    159159);
     
    186186 */
    187187bool psFitsUpdateImage(
    188     const psFits* fits,                ///< the psFits object
     188    psFits* fits,                      ///< the psFits object
    189189    const psImage* input,              ///< the image to output
    190190    psRegion region,                   ///< the region in the FITS image to write
     
    234234 */
    235235psArray* psFitsReadTable(
    236     const psFits* fits                 ///< the psFits object
     236    psFits* fits                       ///< the psFits object
    237237);
    238238
  • trunk/psLib/src/dataManip/psFunctions.c

    r4288 r4315  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-16 22:32:07 $
     9 *  @version $Revision: 1.109 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10161016    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f]
    10171017 *****************************************************************************/
    1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)
     1018float psGaussian(float x, float mean, float sigma, bool normal)
    10191019{
    10201020    psF32 tmp = 1.0;
  • trunk/psLib/src/dataManip/psFunctions.h

    r4190 r4315  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-09 19:26:48 $
     14 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-18 02:30:49 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4141 *  @return psF32      value on the gaussian curve given the input parameters
    4242 */
    43 psF32 psGaussian(
    44     psF32 x,                           ///< Value at which to evaluate
    45     psF32 mean,                        ///< Mean for the Gaussian
    46     psF32 stddev,                      ///< Standard deviation for the Gaussian
    47     psBool normal                      ///< Indicates whether result should be normalized
     43float psGaussian(
     44    float x,                           ///< Value at which to evaluate
     45    float mean,                        ///< Mean for the Gaussian
     46    float sigma,                       ///< Standard deviation for the Gaussian
     47    bool normal                        ///< Indicates whether result should be normalized
    4848);
    4949
  • trunk/psLib/src/dataManip/psStats.c

    r4225 r4315  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.133 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-13 20:18:18 $
     16 *  @version $Revision: 1.134 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-18 02:30:49 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    17981798    The histogram structure
    17991799 *****************************************************************************/
    1800 psHistogram* psHistogramAlloc(psF32 lower, psF32 upper, psS32 n)
     1800psHistogram* psHistogramAlloc(float lower, float upper, int n)
    18011801{
    18021802    PS_ASSERT_INT_POSITIVE(n, NULL);
  • trunk/psLib/src/dataManip/psStats.h

    r4293 r4315  
    1414 *  @author GLG, MHPCC
    1515 *
    16  *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-17 00:11:05 $
     16 *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-18 02:30:49 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    136136 */
    137137psHistogram* psHistogramAlloc(
    138     psF32 lower,                       ///< Lower limit for the bins
    139     psF32 upper,                       ///< Upper limit for the bins
    140     psS32 n                            ///< Number of bins
     138    float lower,                       ///< Lower limit for the bins
     139    float upper,                       ///< Upper limit for the bins
     140    int n                              ///< Number of bins
    141141);
    142142
  • trunk/psLib/src/fits/psFits.c

    r4308 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 23:44:21 $
     9 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    357357}
    358358
    359 bool psFitsSetExtName(const psFits* fits, const char* name)
     359bool psFitsSetExtName(psFits* fits, const char* name)
    360360{
    361361    if (fits == NULL) {
     
    881881}
    882882
    883 bool psFitsUpdateImage(const psFits* fits,
     883bool psFitsUpdateImage(psFits* fits,
    884884                       const psImage* input,
    885885                       psRegion region,
     
    10191019}
    10201020
    1021 bool psFitsWriteHeader(const psMetadata* header,
     1021bool psFitsWriteHeader(const psMetadata* output,
    10221022                       const psFits* fits)
    10231023{
     
    10291029    }
    10301030
    1031     if (header == NULL) {
     1031    if (output == NULL) {
    10321032        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    10331033                PS_ERRORTEXT_psFits_METADATA_NULL);
     
    10391039    //transverse the metadata list and add each key.
    10401040
    1041     psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD,true);
     1041    psListIterator* iter = psListIteratorAlloc(output->list,PS_LIST_HEAD,true);
    10421042    psMetadataItem* item;
    10431043    while ( (item=psListGetAndIncrement(iter)) != NULL ) {
     
    13971397
    13981398
    1399 psArray* psFitsReadTable(const psFits* fits)
     1399psArray* psFitsReadTable(psFits* fits)
    14001400{
    14011401    int status = 0;
  • trunk/psLib/src/fits/psFits.h

    r4308 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-17 23:44:21 $
     9 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    104104 */
    105105bool psFitsSetExtName(
    106     const psFits* fits,                ///< the psFits object
     106    psFits* fits,                      ///< the psFits object
    107107    const char* name                   ///< the extension name
    108108);
     
    155155 */
    156156bool psFitsWriteHeader(
    157     const psMetadata* header,          ///< the psMetadata data in which to write
     157    const psMetadata* output,          ///< the psMetadata data in which to write
    158158    const psFits* fits                 ///< the psFits object
    159159);
     
    186186 */
    187187bool psFitsUpdateImage(
    188     const psFits* fits,                ///< the psFits object
     188    psFits* fits,                      ///< the psFits object
    189189    const psImage* input,              ///< the image to output
    190190    psRegion region,                   ///< the region in the FITS image to write
     
    234234 */
    235235psArray* psFitsReadTable(
    236     const psFits* fits                 ///< the psFits object
     236    psFits* fits                       ///< the psFits object
    237237);
    238238
  • trunk/psLib/src/image/psImage.c

    r4128 r4315  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-07 02:29:44 $
     11 *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-18 02:30:49 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050psImage* psImageAlloc(psU32 numCols,
    5151                      psU32 numRows,
    52                       const psElemType type)
     52                      psElemType type)
    5353{
    5454    psS32 area = 0;
  • trunk/psLib/src/image/psImage.h

    r4195 r4315  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-09 21:20:20 $
     13 *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-18 02:30:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    105105    psU32 numCols,                     ///< Number of rows in image.
    106106    psU32 numRows,                     ///< Number of columns in image.
    107     const psElemType type              ///< Type of data for image.
     107    psElemType type                    ///< Type of data for image.
    108108);
    109109
  • trunk/psLib/src/image/psImageConvolve.c

    r4128 r4315  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-06-07 02:29:44 $
     7 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-06-18 02:30:49 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    279279}
    280280
    281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, psBool direct)
     281psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, bool direct)
    282282{
    283283    if (in == NULL) {
  • trunk/psLib/src/image/psImageConvolve.h

    r4243 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-14 02:54:15 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    123123    const psImage* in,                 ///< the psImage to convolve
    124124    const psKernel* kernel,            ///< kernel to colvolve with
    125     psBool direct                        ///< specifies method, true=direct convolution, false=fourier
     125    bool direct                        ///< specifies method, true=direct convolution, false=fourier
    126126);
    127127
  • trunk/psLib/src/image/psImagePixelManip.c

    r3968 r4315  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-05-19 02:08:21 $
     12 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-18 02:30:49 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3131#include "psCoord.h"
    3232
    33 psS32 psImageClip(psImage* input,
    34                   psF64 min,
    35                   psF64 vmin,
    36                   psF64 max,
    37                   psF64 vmax)
     33int psImageClip(psImage* input,
     34                double min,
     35                double vmin,
     36                double max,
     37                double vmax)
    3838{
    3939    psS32 numClipped = 0;
     
    140140}
    141141
    142 psS32 psImageClipNaN(psImage* input,
    143                      psF64 value)
     142int psImageClipNaN(psImage* input,
     143                   float value)
    144144{
    145145    psS32 numClipped = 0;
     
    310310}
    311311
    312 psS32 psImageClipComplexRegion(psImage* input,
    313                                psC64 min,
    314                                psC64 vmin,
    315                                psC64 max,
    316                                psC64 vmax)
     312int psImageClipComplexRegion(psImage* input,
     313                             psC64 min,
     314                             psC64 vmin,
     315                             psC64 max,
     316                             psC64 vmax)
    317317{
    318318    psS32 numClipped = 0;
  • trunk/psLib/src/image/psImagePixelManip.h

    r4162 r4315  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-08 23:40:45 $
     10 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-18 02:30:49 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3232 *  @return psS32     The number of clipped pixels
    3333 */
    34 psS32 psImageClip(
     34int psImageClip(
    3535    psImage* input,                    ///< the image to clip
    36     psF64 min,                         ///< the minimum image value allowed
    37     psF64 vmin,                        ///< the value pixels < min are set to
    38     psF64 max,                         ///< the maximum image value allowed
    39     psF64 vmax                         ///< the value pixels > max are set to
     36    double min,                        ///< the minimum image value allowed
     37    double vmin,                       ///< the value pixels < min are set to
     38    double max,                        ///< the maximum image value allowed
     39    double vmax                        ///< the value pixels > max are set to
    4040);
    4141
     
    4949 *  @return psS32     The number of clipped pixels
    5050 */
    51 psS32 psImageClipComplexRegion(
     51int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    5353    psC64 min,                         ///< the minimum image value allowed
     
    6464 *  @return psS32     The number of clipped pixels
    6565 */
    66 psS32 psImageClipNaN(
     66int psImageClipNaN(
    6767    psImage* input,                    ///< the image to clip
    68     psF64 value                        ///< the value to set all NaN/Inf values to
     68    float value                        ///< the value to set all NaN/Inf values to
    6969);
    7070
  • trunk/psLib/src/imageops/psImageConvolve.c

    r4128 r4315  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-06-07 02:29:44 $
     7 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-06-18 02:30:49 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    279279}
    280280
    281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, psBool direct)
     281psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, bool direct)
    282282{
    283283    if (in == NULL) {
  • trunk/psLib/src/imageops/psImageConvolve.h

    r4243 r4315  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-14 02:54:15 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    123123    const psImage* in,                 ///< the psImage to convolve
    124124    const psKernel* kernel,            ///< kernel to colvolve with
    125     psBool direct                        ///< specifies method, true=direct convolution, false=fourier
     125    bool direct                        ///< specifies method, true=direct convolution, false=fourier
    126126);
    127127
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r3968 r4315  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-05-19 02:08:21 $
     12 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-18 02:30:49 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3131#include "psCoord.h"
    3232
    33 psS32 psImageClip(psImage* input,
    34                   psF64 min,
    35                   psF64 vmin,
    36                   psF64 max,
    37                   psF64 vmax)
     33int psImageClip(psImage* input,
     34                double min,
     35                double vmin,
     36                double max,
     37                double vmax)
    3838{
    3939    psS32 numClipped = 0;
     
    140140}
    141141
    142 psS32 psImageClipNaN(psImage* input,
    143                      psF64 value)
     142int psImageClipNaN(psImage* input,
     143                   float value)
    144144{
    145145    psS32 numClipped = 0;
     
    310310}
    311311
    312 psS32 psImageClipComplexRegion(psImage* input,
    313                                psC64 min,
    314                                psC64 vmin,
    315                                psC64 max,
    316                                psC64 vmax)
     312int psImageClipComplexRegion(psImage* input,
     313                             psC64 min,
     314                             psC64 vmin,
     315                             psC64 max,
     316                             psC64 vmax)
    317317{
    318318    psS32 numClipped = 0;
  • trunk/psLib/src/imageops/psImagePixelManip.h

    r4162 r4315  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-06-08 23:40:45 $
     10 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-18 02:30:49 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3232 *  @return psS32     The number of clipped pixels
    3333 */
    34 psS32 psImageClip(
     34int psImageClip(
    3535    psImage* input,                    ///< the image to clip
    36     psF64 min,                         ///< the minimum image value allowed
    37     psF64 vmin,                        ///< the value pixels < min are set to
    38     psF64 max,                         ///< the maximum image value allowed
    39     psF64 vmax                         ///< the value pixels > max are set to
     36    double min,                        ///< the minimum image value allowed
     37    double vmin,                       ///< the value pixels < min are set to
     38    double max,                        ///< the maximum image value allowed
     39    double vmax                        ///< the value pixels > max are set to
    4040);
    4141
     
    4949 *  @return psS32     The number of clipped pixels
    5050 */
    51 psS32 psImageClipComplexRegion(
     51int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    5353    psC64 min,                         ///< the minimum image value allowed
     
    6464 *  @return psS32     The number of clipped pixels
    6565 */
    66 psS32 psImageClipNaN(
     66int psImageClipNaN(
    6767    psImage* input,                    ///< the image to clip
    68     psF64 value                        ///< the value to set all NaN/Inf values to
     68    float value                        ///< the value to set all NaN/Inf values to
    6969);
    7070
  • trunk/psLib/src/math/psPolynomial.c

    r4288 r4315  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-16 22:32:07 $
     9 *  @version $Revision: 1.109 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10161016    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f]
    10171017 *****************************************************************************/
    1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)
     1018float psGaussian(float x, float mean, float sigma, bool normal)
    10191019{
    10201020    psF32 tmp = 1.0;
  • trunk/psLib/src/math/psPolynomial.h

    r4190 r4315  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-09 19:26:48 $
     14 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-18 02:30:49 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4141 *  @return psF32      value on the gaussian curve given the input parameters
    4242 */
    43 psF32 psGaussian(
    44     psF32 x,                           ///< Value at which to evaluate
    45     psF32 mean,                        ///< Mean for the Gaussian
    46     psF32 stddev,                      ///< Standard deviation for the Gaussian
    47     psBool normal                      ///< Indicates whether result should be normalized
     43float psGaussian(
     44    float x,                           ///< Value at which to evaluate
     45    float mean,                        ///< Mean for the Gaussian
     46    float sigma,                       ///< Standard deviation for the Gaussian
     47    bool normal                        ///< Indicates whether result should be normalized
    4848);
    4949
  • trunk/psLib/src/math/psSpline.c

    r4288 r4315  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-06-16 22:32:07 $
     9 *  @version $Revision: 1.109 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-18 02:30:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10161016    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f]
    10171017 *****************************************************************************/
    1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)
     1018float psGaussian(float x, float mean, float sigma, bool normal)
    10191019{
    10201020    psF32 tmp = 1.0;
  • trunk/psLib/src/math/psSpline.h

    r4190 r4315  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-09 19:26:48 $
     14 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-18 02:30:49 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4141 *  @return psF32      value on the gaussian curve given the input parameters
    4242 */
    43 psF32 psGaussian(
    44     psF32 x,                           ///< Value at which to evaluate
    45     psF32 mean,                        ///< Mean for the Gaussian
    46     psF32 stddev,                      ///< Standard deviation for the Gaussian
    47     psBool normal                      ///< Indicates whether result should be normalized
     43float psGaussian(
     44    float x,                           ///< Value at which to evaluate
     45    float mean,                        ///< Mean for the Gaussian
     46    float sigma,                       ///< Standard deviation for the Gaussian
     47    bool normal                        ///< Indicates whether result should be normalized
    4848);
    4949
  • trunk/psLib/src/math/psStats.c

    r4225 r4315  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.133 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-13 20:18:18 $
     16 *  @version $Revision: 1.134 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-18 02:30:49 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    17981798    The histogram structure
    17991799 *****************************************************************************/
    1800 psHistogram* psHistogramAlloc(psF32 lower, psF32 upper, psS32 n)
     1800psHistogram* psHistogramAlloc(float lower, float upper, int n)
    18011801{
    18021802    PS_ASSERT_INT_POSITIVE(n, NULL);
  • trunk/psLib/src/math/psStats.h

    r4293 r4315  
    1414 *  @author GLG, MHPCC
    1515 *
    16  *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-17 00:11:05 $
     16 *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-18 02:30:49 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    136136 */
    137137psHistogram* psHistogramAlloc(
    138     psF32 lower,                       ///< Lower limit for the bins
    139     psF32 upper,                       ///< Upper limit for the bins
    140     psS32 n                            ///< Number of bins
     138    float lower,                       ///< Lower limit for the bins
     139    float upper,                       ///< Upper limit for the bins
     140    int n                              ///< Number of bins
    141141);
    142142
  • trunk/psLib/src/mathtypes/psImage.c

    r4128 r4315  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-07 02:29:44 $
     11 *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-18 02:30:49 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050psImage* psImageAlloc(psU32 numCols,
    5151                      psU32 numRows,
    52                       const psElemType type)
     52                      psElemType type)
    5353{
    5454    psS32 area = 0;
  • trunk/psLib/src/mathtypes/psImage.h

    r4195 r4315  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-09 21:20:20 $
     13 *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-18 02:30:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    105105    psU32 numCols,                     ///< Number of rows in image.
    106106    psU32 numRows,                     ///< Number of columns in image.
    107     const psElemType type              ///< Type of data for image.
     107    psElemType type                    ///< Type of data for image.
    108108);
    109109
  • trunk/psLib/src/sys/psError.c

    r3682 r4315  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *
    12  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-07 20:27:41 $
     12 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-18 02:30:50 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    177177
    178178}
    179 void psErrorStackPrint(FILE *fd, const char *fmt, ...)
     179void psErrorStackPrint(FILE *fd, const char *format, ...)
    180180{
    181181    va_list argPtr;             // variable list arguement pointer
    182182
    183183    // Get the variable list parameters to pass to logging function
    184     va_start(argPtr, fmt);
    185 
    186     psErrorStackPrintV(fd,fmt,argPtr);
     184    va_start(argPtr, format);
     185
     186    psErrorStackPrintV(fd,format,argPtr);
    187187
    188188    va_end(argPtr);
    189189}
    190190
    191 void psErrorStackPrintV(FILE *fd, const char *fmt, va_list va)
     191void psErrorStackPrintV(FILE *fd, const char *format, va_list va)
    192192{
    193193
     
    195195
    196196    if (errorStackSize > 0) {
    197         vfprintf(fd,fmt,va);
     197        vfprintf(fd,format,va);
    198198
    199199        for (psS32 lcv=0;lcv<errorStackSize;lcv++) {
  • trunk/psLib/src/sys/psError.h

    r4190 r4315  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-09 19:26:48 $
     14 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-18 02:30:50 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8686void psErrorStackPrint(
    8787    FILE* fd,                          ///< destination file descriptor
    88     const char* fmt,                   ///< printf-style format of header line
     88    const char* format,                   ///< printf-style format of header line
    8989    ...                                ///< any parameters required in fmt
    9090);
     
    101101void psErrorStackPrintV(
    102102    FILE* fd,                          ///< destination file descriptor
    103     const char* fmt,                   ///< printf-style format of header line
     103    const char* format,                   ///< printf-style format of header line
    104104    va_list va                         ///< any parameters required in fmt
    105105);
  • trunk/psLib/src/sysUtils/psError.c

    r3682 r4315  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *
    12  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-07 20:27:41 $
     12 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-06-18 02:30:50 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    177177
    178178}
    179 void psErrorStackPrint(FILE *fd, const char *fmt, ...)
     179void psErrorStackPrint(FILE *fd, const char *format, ...)
    180180{
    181181    va_list argPtr;             // variable list arguement pointer
    182182
    183183    // Get the variable list parameters to pass to logging function
    184     va_start(argPtr, fmt);
    185 
    186     psErrorStackPrintV(fd,fmt,argPtr);
     184    va_start(argPtr, format);
     185
     186    psErrorStackPrintV(fd,format,argPtr);
    187187
    188188    va_end(argPtr);
    189189}
    190190
    191 void psErrorStackPrintV(FILE *fd, const char *fmt, va_list va)
     191void psErrorStackPrintV(FILE *fd, const char *format, va_list va)
    192192{
    193193
     
    195195
    196196    if (errorStackSize > 0) {
    197         vfprintf(fd,fmt,va);
     197        vfprintf(fd,format,va);
    198198
    199199        for (psS32 lcv=0;lcv<errorStackSize;lcv++) {
  • trunk/psLib/src/sysUtils/psError.h

    r4190 r4315  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-09 19:26:48 $
     14 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-18 02:30:50 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8686void psErrorStackPrint(
    8787    FILE* fd,                          ///< destination file descriptor
    88     const char* fmt,                   ///< printf-style format of header line
     88    const char* format,                   ///< printf-style format of header line
    8989    ...                                ///< any parameters required in fmt
    9090);
     
    101101void psErrorStackPrintV(
    102102    FILE* fd,                          ///< destination file descriptor
    103     const char* fmt,                   ///< printf-style format of header line
     103    const char* format,                   ///< printf-style format of header line
    104104    va_list va                         ///< any parameters required in fmt
    105105);
  • trunk/psLib/src/types/psHash.c

    r4136 r4315  
    1212*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-06-07 22:37:52 $
     14*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-06-18 02:30:49 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4343    The linked list
    4444 *****************************************************************************/
    45 psList* psHashKeyList(psHash* table)
     45psList* psHashKeyList(const psHash* hash)
    4646{
    4747    psS32 i = 0;                  // Loop index variable
     
    4949    psHashBucket* ptr = NULL;   // Used to step thru linked list.
    5050
    51     if (table == NULL) {
     51    if (hash == NULL) {
    5252        return NULL;
    5353    }
     
    5757    // Loop through every bucket in the hash table.  If that bucket is not
    5858    // NULL, then add the bucket's key to the linked list.
    59     for (i = 0; i < table->nbucket; i++) {
    60         if (table->buckets[i] != NULL) {
     59    for (i = 0; i < hash->nbucket; i++) {
     60        if (hash->buckets[i] != NULL) {
    6161            // Since a bucket contains a linked list of keys/data, we must
    6262            // step trough each key in that linked list:
    6363
    64             ptr = table->buckets[i];
     64            ptr = hash->buckets[i];
    6565            while (ptr != NULL) {
    6666                psListAdd(myLinkList, PS_LIST_HEAD, ptr->key);
     
    135135    The new hash table.
    136136 *****************************************************************************/
    137 psHash* psHashAlloc(psS32 nbucket)        // initial number of buckets
     137psHash* psHashAlloc(long nalloc)        // initial number of buckets
    138138{
    139139    psS32 i = 0;                  // loop index variable
     
    145145
    146146    // Allocate memory for the buckets.
    147     table->buckets = psAlloc(nbucket * sizeof(psHashBucket* ));
    148     table->nbucket = nbucket;
    149 
    150     psTrace("utils.hash", 1, "Creating %d-element hash table\n", nbucket);
     147    table->buckets = psAlloc(nalloc * sizeof(psHashBucket* ));
     148    table->nbucket = nalloc;
     149
     150    psTrace("utils.hash", 1, "Creating %d-element hash table\n", nalloc);
    151151
    152152    // Initialize all buckets to NULL.
    153     for (i = 0; i < nbucket; i++)
     153    for (i = 0; i < nalloc; i++)
    154154    {
    155155        table->buckets[i] = NULL;
     
    383383    boolean value defining success or failure
    384384 *****************************************************************************/
    385 psBool psHashRemove(psHash* table,
    386                     const char *key)
     385bool psHashRemove(psHash* table,
     386                  const char *key)
    387387{
    388388    psPtr data = NULL;
  • trunk/psLib/src/types/psHash.h

    r4162 r4315  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-08 23:40:45 $
     13 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-18 02:30:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747/// Allocate hash buckets in table.
    4848psHash* psHashAlloc(
    49     psS32 nbucket                  ///< The number of buckets to allocate.
     49    long nalloc                        ///< The number of buckets to allocate.
    5050);
    5151
    5252/// Insert entry into table.
    5353psBool psHashAdd(
    54     psHash* table,                 ///< The table to insert in.
    55     const char *key,               ///< The key to use.
    56     psPtr data                     ///< The data to insert.
     54    psHash* table,                     ///< The table to insert in.
     55    const char *key,                   ///< The key to use.
     56    psPtr data                         ///< The data to insert.
    5757);
    5858
    5959/// Lookup key in table.
    6060psPtr psHashLookup(
    61     psHash* table,                 ///< The table to lookup key in.
    62     const char *key                ///< The key to lookup.
     61    psHash* table,                     ///< The table to lookup key in.
     62    const char *key                    ///< The key to lookup.
    6363);
    6464
    6565/// Remove key from table.
    66 psBool psHashRemove(
    67     psHash* table,                 ///< The table to lookup key in.
    68     const char *key                ///< The key to lookup.
     66bool psHashRemove(
     67    psHash* table,                     ///< The table to lookup key in.
     68    const char *key                    ///< The key to lookup.
    6969);
    7070
    7171/// List all keys in table.
    7272psList* psHashKeyList(
    73     psHash* table                  ///< The table to list keys from..
     73    const psHash* hash                 ///< The table to list keys from..
    7474);
    7575
     
    7979 */
    8080psArray* psHashToArray(
    81     psHash* table                  ///< The table to convert to psArray.
     81    psHash* table                 ///< The table to convert to psArray.
    8282);
    8383
Note: See TracChangeset for help on using the changeset viewer.