MCPcopy Create free account
hub / github.com/MITK/MITK / OnFinalResultsAvailable

Method OnFinalResultsAvailable

Modules/ImageStatisticsUI/src/QmitkDataGeneratorBase.cpp:93–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void QmitkDataGeneratorBase::OnFinalResultsAvailable(JobResultMapType results, const QmitkDataGenerationJobBase *job) const
94{
95 auto resultnodes = mitk::DataStorage::SetOfObjects::New();
96
97 for (const auto &pos : results)
98 {
99 resultnodes->push_back(this->PrepareResultForStorage(pos.first, pos.second, job));
100 }
101
102 {
103 std::lock_guard<std::mutex> mutexguard(m_DataMutex);
104 auto storage = m_Storage.Lock();
105 if (storage.IsNotNull())
106 {
107 m_AddingToStorage = true;
108 for (auto pos = resultnodes->Begin(); pos != resultnodes->End(); ++pos)
109 {
110 storage->Add(pos->Value());
111 }
112 m_AddingToStorage = false;
113 }
114 }
115
116 emit NewDataAvailable(resultnodes.GetPointer());
117
118 if (!resultnodes->empty())
119 {
120 this->EnsureRecheckingAndGeneration();
121 }
122}
123
124void QmitkDataGeneratorBase::NodeAddedOrModified(const mitk::DataNode* node)
125{

Callers

nothing calls this directly

Calls 11

IsNotNullMethod · 0.80
ValueMethod · 0.80
GetPointerMethod · 0.80
NewFunction · 0.50
LockMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
AddMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected