MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / propagateResultReady

Method propagateResultReady

ImagePlay/src/IPProcessGrid.cpp:210–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void IPProcessGrid::propagateResultReady(IPLProcess* process, bool resultReady)
211{
212 qDebug() << "IPProcessGrid::propagateResultReady: " << QString::fromStdString(process->className()) << ", " << (resultReady ? "true" : "false");
213 QQueue<IPProcessStep*> tmpQueue;
214
215 // find step from process
216 for(auto it = _scene->steps()->begin(); it < _scene->steps()->end(); ++it)
217 {
218 IPProcessStep* step = (IPProcessStep*) *it;
219 IPLProcess* tmpProcess = step->process();
220
221 if(tmpProcess == process)
222 {
223 step->process()->setResultReady(resultReady);
224
225 tmpQueue.enqueue(step);
226 break;
227 }
228 }
229
230
231 // add all following processes via BFS
232 int counter = 0;
233 int limit = 100;
234 while(!tmpQueue.isEmpty() && counter < limit)
235 {
236 // set status
237 IPProcessStep* step = tmpQueue.dequeue();
238
239 for(auto it = step->edgesOut()->begin(); it < step->edgesOut()->end(); ++it)
240 {
241 IPProcessEdge* edge = (IPProcessEdge*) *it;
242 IPProcessStep* nextStep = edge->to();
243
244 nextStep->process()->setResultReady(resultReady);
245
246 // add to queue and list
247 tmpQueue.enqueue(nextStep);
248 }
249 }
250
251 _mainWindow->imageViewer()->updateImage();
252}
253
254/*!
255 * \brief IPProcessGrid::execute

Callers

nothing calls this directly

Calls 8

stepsMethod · 0.80
edgesOutMethod · 0.80
toMethod · 0.80
imageViewerMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
processMethod · 0.45
updateImageMethod · 0.45

Tested by

no test coverage detected