ElastixManager::ElastixManager(RegServicesPtr services) : mServices(services) { mOptions = profile()->getXmlSettings().descend(ElastixParameters::getConfigUid()); mParameters.reset(new ElastixParameters(mOptions)); connect(mParameters.get(), SIGNAL(elastixParametersChanged()), this, SIGNAL(elastixChanged())); mDisplayProcessMessages = BoolProperty::initialize("displayProcessMessages", "Show Messages", "Display messages from the running registration process in CustusX", false, mOptions.getElement()); mDisableRendering = BoolProperty::initialize("disableRendering", "Disable Rendering", "Disable rendering while running process.\n" "Can be used to avoid clash in GPU usage.", false, mOptions.getElement()); mExecuter.reset(new ElastixExecuter(services)); connect(mExecuter.get(), SIGNAL(finished()), this, SLOT(executionFinishedSlot())); connect(mExecuter.get(), SIGNAL(aboutToStart()), this, SLOT(preprocessExecuter())); }
void reprintMulticopyDocument::sPrint() { _data->_printed.clear(); foreach (XTreeWidgetItem *item, list()->selectedItems()) { message(tr("Printing %1 #%2") .arg(_data->_doctypefull, item->text("docnumber"))); emit aboutToStart(item); emit timeToPrintOneDoc(item); message(""); }
void printMulticopyDocument::sPrint() { if (! isOkToPrint()) return; //bool mpStartedInitialized = _data->_mpIsInitialized; _data->_printed.clear(); MetaSQLQuery docinfom(_docinfoQueryString); ParameterList alldocsp = getParamsDocList(); XSqlQuery docinfoq = docinfom.toQuery(alldocsp); while (docinfoq.next()) { message(tr("Processing %1 #%2") .arg(_data->_doctypefull, docinfoq.value("docnumber").toString())); // This indirection allows scripts to replace core behavior - 14285 emit aboutToStart(&docinfoq); emit timeToPrintOneDoc(&docinfoq); emit timeToMarkOnePrinted(&docinfoq); emit timeToPostOneDoc(&docinfoq); message(""); } // if (! mpStartedInitialized) if (!_data->_captive) { orReport::endMultiPrint(_data->_printer); _data->_mpIsInitialized = false; } if (_data->_printed.size() == 0) QMessageBox::information(this, tr("No Documents to Print"), tr("There aren't any documents to print.")); else if (! _markAllPrintedQry.isEmpty() && QMessageBox::question(this, tr("Mark Documents as Printed?"), tr("<p>Did all of the documents print correctly?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { ParameterList allp; allp.append("printedDocs", QVariant(_data->_printed)); MetaSQLQuery markAllPrintedm(_markAllPrintedQry); XSqlQuery markPrintedq = markAllPrintedm.toQuery(allp); ErrorReporter::error(QtCriticalMsg, this, tr("Database Error"), markPrintedq, __FILE__, __LINE__); // don't return if (_data->_alert) emit docUpdated(-1); } _data->_printed.clear(); emit finishedWithAll(); if (_data->_captive) accept(); else clear(); if (ErrorReporter::error(QtCriticalMsg, this, tr("Cannot Print"), docinfoq, __FILE__, __LINE__)) return; }