IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 3, 2006, 8:48:10 AM (19 years ago)
Author:
magnier
Message:

defined pmConfigConvertFilename, added to all I/O functions

File:
1 edited

Legend:

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

    r10417 r10421  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-12-02 04:24:48 $
     7 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-12-03 18:48:10 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131
    3232
    33 bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file)
     33bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    3434{
    3535    PS_ASSERT_PTR_NON_NULL(view, false);
     
    3939
    4040    if (view->chip == -1) {
    41         pmFPAWriteJPEG (fpa, view, file);
     41        pmFPAWriteJPEG (fpa, view, file, config);
    4242        return true;
    4343    }
     
    4949
    5050    if (view->cell == -1) {
    51         pmChipWriteJPEG (chip, view, file);
     51        pmChipWriteJPEG (chip, view, file, config);
    5252        return true;
    5353    }
     
    5959
    6060    if (view->readout == -1) {
    61         pmCellWriteJPEG (cell, view, file);
     61        pmCellWriteJPEG (cell, view, file, config);
    6262        return true;
    6363    }
     
    6868    pmReadout *readout = cell->readouts->data[view->readout];
    6969
    70     pmReadoutWriteJPEG (readout, view, file);
     70    pmReadoutWriteJPEG (readout, view, file, config);
    7171    return true;
    7272}
    7373
    7474// read in all chip-level JPEG files for this FPA
    75 bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     75bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    7676{
    7777    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    8282
    8383        pmChip *chip = fpa->chips->data[i];
    84         pmChipWriteJPEG (chip, view, file);
     84        pmChipWriteJPEG (chip, view, file, config);
    8585    }
    8686    return true;
     
    8888
    8989// read in all cell-level JPEG files for this chip
    90 bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     90bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    9191{
    9292    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    9797
    9898        pmCell *cell = chip->cells->data[i];
    99         pmCellWriteJPEG (cell, view, file);
     99        pmCellWriteJPEG (cell, view, file, config);
    100100    }
    101101    return true;
     
    103103
    104104// read in all readout-level JPEG files for this cell
    105 bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     105bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    106106{
    107107    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    112112
    113113        pmReadout *readout = cell->readouts->data[i];
    114         pmReadoutWriteJPEG (readout, view, file);
     114        pmReadoutWriteJPEG (readout, view, file, config);
    115115    }
    116116    return true;
     
    118118
    119119// read in all readout-level Objects files for this cell
    120 bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     120bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    121121{
    122122    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    178178
    179179    psString name = pmFPAfileNameFromRule (file->filerule, file, view);
     180    psString newName = pmConfigConvertFilename (name, config);
    180181    psString mapname = pmFPAfileNameFromRule (file->filextra, file, view);
    181182    psImageJpegColormap *map = psImageJpegColormapSet (NULL, mapname);
     
    185186    }
    186187
    187     psImageJpeg (map, readout->image, name, min, max);
     188    psImageJpeg (map, readout->image, newName, min, max);
     189    psFree(newName);
    188190    psFree(name);
    189191    psFree(map);
Note: See TracChangeset for help on using the changeset viewer.