IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8418


Ignore:
Timestamp:
Aug 17, 2006, 5:06:32 PM (20 years ago)
Author:
Paul Price
Message:

Reading into extant buffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r8246 r8418  
    8181
    8282// Read a component of a readout
    83 psImage *readoutReadComponent(psFits *fits, // FITS file from which to read
     83psImage *readoutReadComponent(psImage *image, // Image into which to read
     84                              psFits *fits, // FITS file from which to read
    8485                              const psRegion *region, // Region to read
    8586                              int readdir, // Read direction (1=rows, 2=cols)
     
    128129    psTrace("psModules.camera", 5, "Reading section [%.0f:%.0f,%.0f:%.0f]\n",
    129130            toRead.x0, toRead.x1, toRead.y0, toRead.y1);
    130     psImage *image = psFitsReadImage(fits, toRead, z); // Desired pixels
     131    image = psFitsReadImageBuffer(image, fits, toRead, z); // Desired pixels
    131132    psTrace("psModules.camera", 7, "Image is %dx%d\n", image->numCols, image->numRows);
    132133
     
    278279    // Blow away existing data.
    279280    // Do this before returning, so that we're not returning data from a previous read
     281    #if 1
    280282    psFree(readout->image);
    281283    readout->image = NULL;
     284    #endif
     285
    282286    while (readout->bias->n > 0) {
    283287        psListRemove(readout->bias, PS_LIST_HEAD);
     
    295299
    296300    // Get the new the trim section
    297     readout->image = readoutReadComponent(fits, trimsec, readdir, offset, upper, z, bad); // The image
     301    readout->image = readoutReadComponent(readout->image, fits, trimsec, readdir,
     302                                          offset, upper, z, bad); // The image
    298303
    299304    // Get the new bias sections
     
    301306    psRegion *biassec = NULL;           // Bias section from iteration
    302307    while ((biassec = psListGetAndIncrement(biassecsIter))) {
    303         psImage *bias = readoutReadComponent(fits, biassec, readdir, offset, upper, z, bad); // The bias
     308        psImage *bias = readoutReadComponent(NULL, fits, biassec, readdir, offset, upper, z, bad); // The bias
    304309        psListAdd(readout->bias, PS_LIST_TAIL, bias);
    305310        psFree(bias);                   // Drop reference
Note: See TracChangeset for help on using the changeset viewer.