IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23358


Ignore:
Timestamp:
Mar 17, 2009, 2:26:38 PM (17 years ago)
Author:
Paul Price
Message:

Adding new substitution for file rules: {FILE.INDEX}. Added a counter to pmFPAfile to provide this value. This is intended for ppStack convolution files, which are multiple (unknown number) output files which would all have the same name but for this new substitution rule.

Location:
trunk/psModules/src/camera
Files:
2 edited

Legend:

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

    r23272 r23358  
    2020#include "pmConceptsCopy.h"
    2121
     22static int fileNum = 0;                 // Number of file
     23
    2224static void pmFPAfileFree(pmFPAfile *file)
    2325{
     
    100102
    101103    file->save = false;
     104
     105    file->index = fileNum++;
    102106
    103107    file->imageId = 0;
     
    350354            psStringSubstitute(&newRule, name, "{OUTPUT}");
    351355        }
     356    }
     357
     358    if (strstr(newRule, "{FILE.INDEX}")) {
     359        // Number of the file in list
     360        psString num = NULL;            // Number to use
     361        psStringAppend(&num, "%d", file->index);
     362        psStringSubstitute(&newRule, num, "{FILE.INDEX}");
     363        psFree(num);
    352364    }
    353365
  • trunk/psModules/src/camera/pmFPAfile.h

    r23272 r23358  
    109109    psString formatName;                // name of the camera format
    110110
     111    int index;                          // Index of file
     112
    111113    psS64 imageId, sourceId;            // Image and source identifiers
    112114} pmFPAfile;
Note: See TracChangeset for help on using the changeset viewer.