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

Function GetParameter

Modules/AlgorithmsExt/include/mitkNonBlockingAlgorithm.h:201–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 */
200 template <typename T>
201 void GetParameter(const char *parameter, T &value) const
202 {
203 // MITK_INFO << "GetParameter normal(" << parameter << ") " << typeid(T).name() << std::endl;
204 // m_ParameterListMutex->Lock();
205 BaseProperty *p = m_Parameters->GetProperty(parameter);
206 GenericProperty<T> *gp = dynamic_cast<GenericProperty<T> *>(p);
207 if (gp)
208 {
209 value = gp->GetValue();
210 // m_ParameterListMutex->Unlock();
211 return;
212 }
213 // m_ParameterListMutex->Unlock();
214
215 std::string error("There is no parameter \"");
216 error += parameter;
217 error += '"';
218 throw std::invalid_argument(error);
219 }
220
221 /**
222 * \brief Get a parameter that holds a smart pointer.

Callers 6

AddParameterMethod · 0.85

Calls 2

GetPropertyMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected