IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 27, 2006, 7:12:19 PM (20 years ago)
Author:
Paul Price
Message:

Changes to pmHDU and pmFPAWrite to (hopefully) fix for the last time
this horrible problem of when we write that annoying blank PHU. When
we want to write something out, there are four usage cases for the
pm{FPA,Chip,Cell}Write functions:

(1) Write the blank PHU only: blank=true, recurse=false;
(2) Write an image HDU only: blank=false, recurse=false;
(3) Write an entire file: blank=true, recurse=true; and
(4) Write only image HDUs within the file: blank=false, recurse=true.

So here, the "blank" boolean indicates whether we should write a
"blank" HDU (which consists of a header only, i.e., no pixels) when we
come across it. "recurse" is self-explanatory.

File:
1 edited

Legend:

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

    r7624 r7717  
    3232}
    3333
    34 static pmHDU *findPHU(const pmCell *cell// The cell for which to find the PHU
    35                      )
     34static pmHDU *findBlankPHU(const pmCell *cell// The cell for which to find the PHU
     35                          )
    3636{
    3737    assert(cell);
    3838
    39     if (cell->hdu && cell->hdu->phu) {
     39    if (cell->hdu && cell->hdu->blankPHU) {
    4040        return cell->hdu;
    4141    }
    4242    pmChip *chip = cell->parent;        // The parent chip
    43     if (chip->hdu && chip->hdu->phu) {
     43    if (chip->hdu && chip->hdu->blankPHU) {
    4444        return chip->hdu;
    4545    }
    4646    pmFPA *fpa = chip->parent;  // The parent FPA
    47     if (fpa->hdu && fpa->hdu->phu) {
     47    if (fpa->hdu && fpa->hdu->blankPHU) {
    4848        return fpa->hdu;
    4949    }
     
    261261    }
    262262    // Copy the PHU over as well, if required
    263     pmHDU *targetPHU = findPHU(target); // The target PHU
     263    pmHDU *targetPHU = findBlankPHU(target); // The target PHU
    264264    if (targetPHU && targetPHU != targetHDU && !targetPHU->header) {
    265         pmHDU *sourcePHU = findPHU(source); // The source PHU
     265        pmHDU *sourcePHU = findBlankPHU(source); // The source PHU
    266266        targetPHU->header = psMetadataCopy(targetPHU->header, sourcePHU->header);
    267267    }
Note: See TracChangeset for help on using the changeset viewer.