예제 #1
0
int reconstruction(char *pathToSino, char *pathToOutput) {
	int ret = 0;
	logIt(DEBUG, "reconstruction(char *pathToSino, char *pathToOutput) started.");
	outputPath = pathToOutput;
	sinoPath = pathToSino;
    LARGE_INTEGER frequency;
    LARGE_INTEGER t1, t2;
    double elapsedTime;
    QueryPerformanceFrequency(&frequency);
    QueryPerformanceCounter(&t1);

	logIt(DEBUG, "Debug: outputpath: %s", outputPath);
	logIt(INFO, "Starting Reconstruction for %d projections.", cfg.numberOfProjectionAngles);


	ret = startReconstruction();

	QueryPerformanceCounter(&t2);
	elapsedTime = (double)(t2.QuadPart - t1.QuadPart) / frequency.QuadPart;
	logIt(INFO,  "Reconstruction finished. Runtime: %f seconds.", elapsedTime);
	logIt(DEBUG, "reconstruction(char *pathToSino, char *pathToOutput) finished.");
	return ret;
}
//===================================================PointCloudProgressDlg==============================================//
PointCloudGenProgressDlg::PointCloudGenProgressDlg(QWidget* parent)
{
  setupUi(this);
  progressBar->setValue(0);
  labelIconStart->setEnabled(false);
  labelIconSFM->setEnabled(false);
  labelIconPmvs->setEnabled(false);
  labelIconCompleted->setEnabled(false);
  labelIconTextureGeneration->setEnabled(false);

  m_time = new QTimer();
  m_TextureGenerator = new TextureGenrator();
  m_TextureGenerator->setParentPtr(this);

  connect(pushButtonFileDir,             SIGNAL(clicked()),             this,         SLOT(doActionGetFileDir()));
  connect(pushButtonPause,               SIGNAL(clicked()),             this,         SLOT(doActionPause()));
  connect(pushButtonStop,                SIGNAL(clicked()),             this,         SLOT(doActionStop()));
 
  //connect(m_TextureGenerator,            SIGNAL(outPutText(QString)),   this,         SLOT(outputText(QString)));
  //connect(m_TextureGenerator,            SIGNAL(processBarStepOn()),    this,         SLOT(stepOne()));
  //connect(m_TextureGenerator,            SIGNAL(updateAll()),           this,         SLOT(updateAll()));
  connect(pushButtonStartReconstruction, SIGNAL(clicked()),             m_TextureGenerator,         SLOT(startReconstruction()),  Qt::QueuedConnection);
  m_TextureGenerator->moveToThread(&m_thread);
  m_thread.start();

  update();
}