コード例 #1
0
void Benchmark::on_pushButton_analyse_clicked()
{
    QString video=ui->comboBox_video->currentText();
    if(video.compare("all")==0){
        for(uint i=0;i<globalVideosList.size();i++){
            QString videoFile=globalVideosList[i];
            processOne(videoFile);
        }
    }
    else{
        QString videoFile=video;
        processOne(videoFile);
    }
}
コード例 #2
0
ファイル: E57Writer.cpp プロジェクト: PDAL/PDAL
void E57Writer::write(const PointViewPtr view)
{
    for (PointId id = 0; id < view->size(); ++id)
    {
        PointRef point = view->point(id);
        processOne(point);
    }
}
コード例 #3
0
ファイル: program.cpp プロジェクト: aearturo/UVA
int main()
{
	initIndexes();

	while(processOne());

	return 0;
}
コード例 #4
0
ファイル: FerryFilter.cpp プロジェクト: PDAL/PDAL
void FerryFilter::filter(PointView& view)
{
    PointRef point(view, 0);
    for (PointId id = 0; id < view.size(); ++id)
    {
        point.setPointId(id);
        processOne(point);
    }
}
コード例 #5
0
void TransformationFilter::filter(PointView& view)
{
    PointRef point(view, 0);
    for (PointId idx = 0; idx < view.size(); ++idx)
    {
        point.setPointId(idx);
        processOne(point);
    }
}
コード例 #6
0
void BaseService::process(const ReadEvent &event)
{
    LogDebug("Read event for counter: " << event.connectionID.counter);
    auto &info = m_connectionInfoMap[event.connectionID.counter];
    info.buffer.Push(event.rawBuffer);

    // We can get several requests in one package.
    // Extract and process them all
    while (processOne(event.connectionID, info.buffer, info.interfaceID));
}
コード例 #7
0
void AdvancedRenameProcessDialog::slotRenameImages()
{
    if (d->newNameList.isEmpty())
    {
        slotCancel();
        return;
    }

    processOne();
}
コード例 #8
0
ファイル: FauxReader.cpp プロジェクト: EricAlex/PDAL
point_count_t FauxReader::read(PointViewPtr view, point_count_t count)
{
    for (PointId idx = 0; idx < count; ++idx)
    {
        PointRef point = view->point(idx);
        if (!processOne(point))
            break;
        if (m_cb)
            m_cb(*view, idx);
    }
    return count;
}
コード例 #9
0
ファイル: TileDBReader.cpp プロジェクト: PDAL/PDAL
point_count_t TileDBReader::read(PointViewPtr view, point_count_t count)
{
    PointRef point = view->point(0);
    PointId id;
    for (id = 0; id < count; ++id)
    {
        point.setPointId(id);
        if (!processOne(point))
            break;
    }
    return id;   
}
コード例 #10
0
ファイル: TextReader.cpp プロジェクト: pblottiere/PDAL
point_count_t TextReader::read(PointViewPtr view, point_count_t numPts)
{
    PointId idx = view->size();
    point_count_t cnt = 0;
    PointRef point(*view, idx);
    while (cnt < numPts)
    {
        point.setPointId(idx);
        if (!processOne(point))
            break;
        cnt++;
        idx++;
    }
    return cnt;
}
コード例 #11
0
ファイル: RangeFilter.cpp プロジェクト: pblottiere/PDAL
PointViewSet RangeFilter::run(PointViewPtr inView)
{
    PointViewSet viewSet;
    if (!inView->size())
        return viewSet;

    PointViewPtr outView = inView->makeNew();

    for (PointId i = 0; i < inView->size(); ++i)
    {
        PointRef point = inView->point(i);
        if (processOne(point))
            outView->appendPoint(*inView, i);
    }

    viewSet.insert(outView);
    return viewSet;
}
コード例 #12
0
ファイル: CS468_WK5_prog2.c プロジェクト: trentonknight/prog1
/////////////////////////////////////////////////////////////////////////
/// Compile with: gcc -ggdb CS468_WK5_prog2.c processinf.c psthreads.c///
////////////////////////////////////////////////////////////////////////
int main()
{
char word[10];
int fd1[2];
int fd2[2];
int fd3[2];
int f1_pid;
int f2_pid;
int f3_pid;
int f4_pid;
pipe(fd1);
pipe(fd2);
pipe(fd3);
getInput(word);
f1_pid = fork();
if(f1_pid == 0){
processOne(fd1,word);
}
sleep(5);
kill(f1_pid, SIGSTOP);
f2_pid = fork();
if(f2_pid == 0){
processTwo(fd1,fd2);
}
sleep(5);
kill(f2_pid, SIGSTOP);
f3_pid =  fork();
if(f3_pid == 0){
processThree(fd2,fd3);
}
sleep(5);
kill(f3_pid, SIGSTOP);
f4_pid = fork();
if(f4_pid == 0){
processFin(fd3,fd1);
}
sleep(10);
kill(f4_pid, SIGINT);
kill(f3_pid, SIGINT);
kill(f2_pid, SIGINT);
kill(f1_pid, SIGINT);

return 0;
}
コード例 #13
0
ファイル: SbetReader.cpp プロジェクト: Rafaelaniemann/PDAL
point_count_t SbetReader::read(PointViewPtr view, point_count_t count)
{
    PointId nextId = view->size();
    PointId idx = m_index;
    point_count_t numRead = 0;
    seek(idx);
    while (numRead < count && idx < m_numPts)
    {
        PointRef point = view->point(nextId);
        processOne(point);
        if (m_cb)
            m_cb(*view, nextId);

        idx++;
        nextId++;
        numRead++;
    }
    m_index = idx;
    return numRead;
}
コード例 #14
0
void FingerPrintsGenerator::slotGotImagePreview(const LoadingDescription& desc, const DImg& img)
{
    if (d->allPicturesPath.isEmpty())
    {
        return;
    }

    if (d->allPicturesPath.first() != desc.filePath)
    {
        return;
    }

    if (!img.isNull())
    {
        // compute Haar fingerprint
        d->haarIface.indexImage(desc.filePath, img);
    }

    QPixmap pix = DImg(img).smoothScale(128, 128, Qt::KeepAspectRatio).convertToPixmap();
    addedAction(pix, desc.filePath);
    advance(1);

    if (!d->allPicturesPath.isEmpty())
    {
        d->allPicturesPath.removeFirst();
    }

    if (d->allPicturesPath.isEmpty())
    {
        complete();
    }
    else
    {
        processOne();
    }
}
コード例 #15
0
ファイル: IPCClientPrivate.cpp プロジェクト: cmotc/usbguard
 void IPCClientPrivate::processEvent()
 {
   const json j = receiveOne();
   processOne(j);
 }
コード例 #16
0
void AdvancedRenameProcessDialog::slotRenameFinished()
{
    if (d->cancel)
    {
        return;
    }

    advance(1);

    if (d->newNameList.isEmpty())
    {
        if (!d->failedList.isEmpty())
        {
            QPointer<QMessageBox> msgBox = new QMessageBox(QMessageBox::Warning,
                     i18n("Renaming images"),
                     i18np("An error occurred while renaming %1 image.\n"
                           "Do you want to rename this image again or "
                           "rename this image by overwriting?",
                           "An error occurred while renaming %1 images.\n"
                           "Do you want to rename these images again or "
                           "rename these images by overwriting?",
                           d->failedList.count()),
                     QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this);

            msgBox->button(QMessageBox::Yes)->setText(i18n("Rename Again"));
            msgBox->button(QMessageBox::Yes)->setIcon(QIcon::fromTheme(QLatin1String("document-edit")));
            msgBox->button(QMessageBox::No)->setText(i18n("Overwrite"));
            msgBox->button(QMessageBox::No)->setIcon(QIcon::fromTheme(QLatin1String("edit-copy")));

            int result = msgBox->exec();
            delete msgBox;

            if (result == QMessageBox::Cancel)
            {
                d->failedList.clear();
                complete();
            }
            else if (result == QMessageBox::No)
            {
                d->newNameList = d->failedList;
                d->failedList.clear();
                d->overwrite   = true;

                setValue(0);
                getNextThumbnail();
                setLabel(d->infoLabel);
                setMaximum(d->newNameList.count());
                QTimer::singleShot(500, this, SLOT(slotRenameImages()));
            }
            else
            {
                complete();
            }
        }
        else
        {
            complete();
        }
    }
    else
    {
        processOne();
    }
}