IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 30, 2006, 6:00:06 PM (20 years ago)
Author:
Paul Price
Message:

Rearranging header files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImage.c

    r6148 r6260  
     1#include <stdio.h>
     2#include "pslib.h"
    13#include "ppImage.h"
    2 
    3 psMemId ppMemAlloc(const psMemBlock *ptr)
    4 {
    5     psLogMsg(__func__, PS_LOG_INFO,
    6              "Allocated memory block %d: %ld references\n"
    7              "\tFile %s, line %d, size %d\n"
    8              "\tPosts: %lx %lx %lx\n"
    9              "\tLast operation: %s:%d\n",
    10              ptr->id, ptr->refCounter, ptr->file, ptr->lineno, ptr->userMemorySize, ptr->startblock,
    11              ptr->endblock, *(void**)((int8_t *)(ptr + 1) + ptr->userMemorySize),
    12              ptr->lastopFile, ptr->lastopLine);
    13     return 0;
    14 }
    15 
    16 psMemId ppMemFree(const psMemBlock *ptr)
    17 {
    18     psLogMsg(__func__, PS_LOG_INFO,
    19              "Freed memory block %d: %ld references\n"
    20              "\tFile %s, line %d, size %d\n"
    21              "\tPosts: %lx %lx %lx\n"
    22              "\tLast operation: %s:%d\n",
    23              ptr->id, ptr->refCounter-1, ptr->file, ptr->lineno, ptr->userMemorySize, ptr->startblock,
    24              ptr->endblock, *(void**)((int8_t *)(ptr + 1) + ptr->userMemorySize),
    25              ptr->lastopFile, ptr->lastopLine);
    26     return 0;
    27 }
     4#include "ppMem.h"
    285
    296
    307int main(int argc, char **argv)
    318{
    32 #if 0
    33     psMemAllocCallbackSet(ppMemAlloc);
    34     psMemFreeCallbackSet(ppMemFree);
    35 //    psMemAllocCallbackSetID(6967);
    36 //    psMemFreeCallbackSetID(6967);
    37     psMemAllocCallbackSetID(51804);
    38     psMemFreeCallbackSetID(51804);
    39 #endif
     9//    psErrorRegister(NULL, -1);
    4010
    41     ppData data;
    42     ppConfig config;
    43     ppOptions options;
     11    ppImageData *data = ppImageDataAlloc();
     12    ppImageOptions *options = ppImageOptionsAlloc();
     13    ppConfig *config = ppConfigAlloc();
    4414
    4515    psTimerStart(TIMERNAME);
    4616
    4717    // Parse the configuration and arguments
    48     ppImageConfig(&config, argc, argv);
     18    ppImageConfig(config, argc, argv);
    4919
    5020    // Open the input image, output image, output mask
    5121    // Get camera configuration from header if not already defined
    5222    // Construct camera in preparation for reading
    53     ppImageParseCamera(&data, &config);
     23    ppImageParseCamera(data, config);
     24
     25    // Cleaning up
     26    psFree(data);
     27    psFree(options);
     28    psFree(config);
     29    psTimerStop();
     30    ppMemCheck();
     31#if 0
    5432
    5533    // Set various tasks (define optional operations)
    56     ppImageOptions(&data, &options, &config);
     34    ppImageOptionsParse(data, options, config);
    5735
    5836    // open detrend images, load headers, optionally load pixels
    59     ppImageParseDetrend(&data, &options, &config);
     37    ppImageParseDetrend(data, options, config);
    6038
    6139    // Image Arithmetic Loop
    62     ppImageLoop(&data, &options, &config);
    63 
    64 #if 0
    65     // Output image
    66     ppImageOutput(&data, &config);
    67 
    68     // Do photometry
    69     ppImagePhot(&data, &options, &config);
     40    ppImageLoop(data, options, config);
    7041#endif
    7142
Note: See TracChangeset for help on using the changeset viewer.