IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 11, 2008, 5:22:32 PM (18 years ago)
Author:
Paul Price
Message:

Get photcode from camera configuration instead of PPIMAGE recipe
(psModules shouldn't need to know about the existence of something
called PPIMAGE).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsPhotcode.c

    r13410 r19018  
    1717#include "pmConceptsPhotcode.h"
    1818
    19 psString pmConceptsPhotcodeForView(pmConfig *config, pmFPAfile *file, const pmFPAview *view)
     19psString pmConceptsPhotcodeForView(pmFPAfile *file, const pmFPAview *view)
    2020{
    21     PS_ASSERT_PTR_NON_NULL(config, NULL);
    2221    PS_ASSERT_PTR_NON_NULL(file, NULL);
    2322    PS_ASSERT_PTR_NON_NULL(view, NULL);
     
    2827    }
    2928
    30     // select recipe options supplied on command line
     29    // select photcode rule from camera configuration
    3130    bool mdok;                          // Status of MD lookup
    32     psMetadata *recipe  = psMetadataLookupPtr(&mdok, config->recipes, "PPIMAGE");
    33     if (!mdok || !recipe) {
    34         psError(PS_ERR_IO, true, "Recipe PPIMAGE not found\n");
    35         return NULL;
    36     }
    37 
    38     // select photcode rule from recipe
    39     char *rule = psMetadataLookupStr(&mdok, recipe, "PHOTCODE.RULE");
     31    char *rule = psMetadataLookupStr(&mdok, file->camera, "PHOTCODE.RULE");
    4032    if (!mdok || !rule || strlen(rule) == 0) {
    41         psError(PS_ERR_IO, true, "PHOTCODE.RULE not found in PPIMAGE recipe\n");
     33        psError(PS_ERR_IO, true, "PHOTCODE.RULE not found in camera configuration.");
    4234        return NULL;
    4335    }
Note: See TracChangeset for help on using the changeset viewer.