Beispiel #1
0
int main(int argc, char *argv[])
/* Process command line. */
{
int start = 0, count = 0;
char *lockDir;
char *source, *dest, *hostList;

if (argc != 3 && argc != 4 && argc != 5)
    usage();
if (argc == 5)
    {
    dest = argv[1];
    hostList = argv[2];
    start = atoi(argv[3]);
    lockDir = argv[4];
    ccMore(dest, hostList, start, lockDir);
    }
else
    {
    source = argv[1];
    dest = argv[2];
    if (argc == 4)
	{
	hostList = argv[3];
	hostList = fullPathName(hostList);
	}
    else
	hostList = "/projects/compbio/experiments/hg/masterList";
    lockDir = tempnam("/projects/compbio/experiments/hg/tmp", "lock");
    amFirst = TRUE;
    ccFirst(source, dest, hostList, lockDir);
    }
}
Beispiel #2
0
int main(int argc, char *argv[])
/* Process command line. */
{
char *source, *dest, *hostList;

optionHash(&argc, argv);
crossSwitchMax = optionInt("crossMax", crossSwitchMax);
if (argc != 3 && argc != 4)
    usage();
source = argv[1];
dest = argv[2];
if (argc == 4)
    {
    hostList = argv[3];
    hostList = fullPathName(hostList);
    }
else
    hostList = "/projects/compbio/experiments/hg/switchList";
ccCp(source, dest, hostList);
return 0;
}
void formMergeSlideCalibrations::on_pbMergeCalibration_clicked()
{
    //----------------------------------------------
    //Validate Camera ID
    //----------------------------------------------
    QString CameraID(ui->txtCameraID->text().trimmed());
    if(
            CameraID.isEmpty()                              ||
            ui->txtHorPath->text().trimmed().isEmpty()      ||
            ui->txtVertPath->text().trimmed().isEmpty()     ||
            ui->txtAffineTrans->text().trimmed().isEmpty()
    ){
        funcShowMsgERROR_Timeout("All Fields are Required");
        return (void)false;
    }

    //----------------------------------------------
    //Get Half-Calibrations
    //----------------------------------------------
    //Read Horizontal
    structSlideCalibration slideCalibration;
    funcReadHorHalfCalib(ui->txtHorPath->text().trimmed(), &slideCalibration);
    //Update OriginH from User Settings
    slideCalibration.originH = ui->spinBoxOriginH->value();
    //Read Vertical
    float referenceX2 = 0;
    funcReadVertHalfCalib(
                            ui->txtVertPath->text().trimmed(),
                            &referenceX2,
                            &slideCalibration
                         );

    //----------------------------------------------
    //Load Affine Transformation
    //----------------------------------------------
    QTransform T;
    if( funcReadAffineTransXML( ui->txtAffineTrans->text().trimmed(), &T ) != _OK )
    {
        funcShowMsgERROR_Timeout("Reading Affine Transformation");
        return (void)false;
    }

    //----------------------------------------------
    //Load Sensitivities If was Selected
    //----------------------------------------------
    structSlideStrSens slideSensitivities;
    if( !ui->txtHorPath->text().trimmed().isEmpty() )
    {        
        funcReadSensitivities( ui->txtSensitivities->text().trimmed(), &slideSensitivities );
    }

    //---------------------------------------
    //Get Origin Point
    //---------------------------------------
    float horA, horB;
    float verA, verB;
    //Prefill Coordinates
    horA  = slideCalibration.horizLR.a;
    horB  = slideCalibration.horizLR.b;
    verA  = slideCalibration.vertLR.a;
    verB  = slideCalibration.vertLR.b;
    slideCalibration.originY = round( (horB*referenceX2)+horA);
    slideCalibration.originX = round( (verB*slideCalibration.originY)+verA );

    //----------------------------------------------
    //Save Merged Calibration File
    //----------------------------------------------
    //Define Filename
    QString fullPathName(_PATH_SLIDE_CALIB_PATH);
    fullPathName.append("slideCam_");
    fullPathName.append(CameraID);
    fullPathName.append(".xml");
    //Save File
    if(
            funcSaveSlideCalibration(
                                        &fullPathName,
                                        &slideCalibration,
                                        &slideSensitivities,
                                        &T
                                    ) != _OK
    ){
        funcShowMsgERROR_Timeout("Saving Slide Calibration File");
        return (void)false;
    }

    this->close();

}