示例#1
0
void MainWindow::dropEvent(QDropEvent *event)
{
    event->acceptProposedAction();
    QList<QUrl> droppedUrls = event->mimeData()->urls();
    int droppedUrlCnt = droppedUrls.size();
    QStringList files;
    for(int i = 0; i < droppedUrlCnt; i++)
        files << droppedUrls[i].toLocalFile();

    if(files.size() == 1)
    {
        if(QFileInfo(files[0]).completeSuffix() == "fib.gz")
        {
            loadFib(files[0]);
            return;
        }
        if(QFileInfo(files[0]).completeSuffix() == "src.gz")
        {
            loadSrc(files);
            return;
        }
    }

    dicom_parser* dp = new dicom_parser(files,this);
    dp->setAttribute(Qt::WA_DeleteOnClose);
    dp->showNormal();

}
示例#2
0
//wraps it all together
void FindGoal::finalize()
{
    loadSrc();
    cv::Mat blurred = preProcess(src);
    std::vector<cv::Vec4i> houghLines = edgeDetection(blurred, srcCopy);
    cv::Vec4i goalCors = shapeValidation(houghLines);
    graphics(goalCors, srcCopy);
}
示例#3
0
 bool Shader::loadFile(const QString& f)
 {
   bool changed = false;
   setFilename(f);
   QFile file(filename());
   if (file.open(QFile::ReadOnly | QFile::Text)) {
     changed = loadSrc(file.readAll());
   }
   return changed;
 }
示例#4
0
void MainWindow::on_Reconstruction_clicked()
{
    QStringList filenames = QFileDialog::getOpenFileNames(
                           this,
                           "Open Src files",
                           ui->workDir->currentText(),
                           "Src files (*src.gz *.src);;All files (*)" );
    if (filenames.isEmpty())
        return;
    loadSrc(filenames);
}
示例#5
0
void MainWindow::openRecentSrcFile(void)
{
    QAction *action = qobject_cast<QAction *>(sender());
    loadSrc(QStringList() << action->data().toString());
}
示例#6
0
void MainWindow::open_src_at(int row,int col)
{
    loadSrc(QStringList() << (ui->recentSrc->item(row,1)->text() + "/" +
            ui->recentSrc->item(row,0)->text()));
}