IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23258


Ignore:
Timestamp:
Mar 10, 2009, 3:21:06 PM (17 years ago)
Author:
bills
Message:

use the replicateOutputs function in streaksio.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksreplace.c

    r21156 r23258  
    44static bool readAndCopyToOutput(streakFiles *sf, bool restoreImageCube);
    55static void writeImages(streakFiles *sf, bool exciseImageCube);
    6 static bool replicateOutputs(streakFiles *sfiles);
    76static bool readAndCopyToOutput(streakFiles *sf, bool restoreImageCube);
    87
     
    9291    closeImages(sfiles);
    9392
    94     // NOTE: from here on we can't just quit if something goes wrong.
    95     // especially if we're working at the raw stage
    96 
    9793    if (!replicateOutputs(sfiles)) {
    9894        psError(PS_ERR_UNKNOWN, false, "failed to replicate output files");
     
    429425    }
    430426}
    431 
    432 static bool replicateOutputs(streakFiles *sfiles)
    433 {
    434     bool status = false;
    435 
    436     // XXX: TODO: need a nebGetXatrr function, but there isn't one
    437     // another option would be to take the number of copies to be
    438     // created as an option. That way the system could decide
    439     // whether to replicate anything other than raw Image files
    440     void *xattr = NULL;
    441 
    442     if (!replicate(sfiles->outImage, xattr)) {
    443         psError(PM_ERR_SYS, false, "failed to replicate outImage.");
    444         return false;
    445     }
    446 
    447 #ifdef notyet
    448     // XXX: don't replicate mask and weight images until we can look up
    449     // the input's xattr. There may be a perl program that can getXattr
    450     if (sfiles->outMask) {
    451         // get xattr from input to see if we need to replicate
    452         if (!replicate(sfiles->outMask, xattr)) {
    453             psError(PM_ERR_SYS, false, "failed to replicate outImage.");
    454             return false;
    455         }
    456     }
    457     if (sfiles->outWeight) {
    458         // get xattr from input to see if we need to replicate
    459         if (!replicate(sfiles->outWeight, xattr)) {
    460             psError(PM_ERR_SYS, false, "failed to replicate outImage.");
    461             return false;
    462         }
    463     }
    464 #endif
    465 
    466 //      replicate the recovery images (if in nebulous)
    467 //      perhaps whether we do that or not should be configurable.
    468 //      Sounds like we need a recipe
    469 
    470     return true;
    471 }
    472 
Note: See TracChangeset for help on using the changeset viewer.