| 227 | */ |
| 228 | template <typename T> |
| 229 | void GetPointerParameter(const char *parameter, itk::SmartPointer<T> &value) const |
| 230 | { |
| 231 | // MITK_INFO << this << "->GetParameter smartpointer(" << parameter << ") " << typeid(itk::SmartPointer<T>).name() |
| 232 | // << std::endl; |
| 233 | // m_ParameterListMutex->Lock(); |
| 234 | BaseProperty *p = m_Parameters->GetProperty(parameter); |
| 235 | if (p) |
| 236 | { |
| 237 | SmartPointerProperty *spp = dynamic_cast<SmartPointerProperty *>(p); |
| 238 | if (spp) |
| 239 | { |
| 240 | T *t = dynamic_cast<T *>(spp->GetSmartPointer().GetPointer()); |
| 241 | value = t; |
| 242 | // m_ParameterListMutex->Unlock(); |
| 243 | return; |
| 244 | } |
| 245 | } |
| 246 | // m_ParameterListMutex->Unlock(); |
| 247 | |
| 248 | std::string error("There is no parameter \""); |
| 249 | error += parameter; |
| 250 | error += '"'; |
| 251 | throw std::invalid_argument(error); |
| 252 | } |
| 253 | |
| 254 | /** |
| 255 | * \brief Reset the algorithm to its initial state. |
no test coverage detected