| 488 | } |
| 489 | |
| 490 | void mitk::Label::SetAlgorithmName(const std::string& algoName) |
| 491 | { |
| 492 | if (algoName.empty()) |
| 493 | { |
| 494 | // Mirror SetAlgorithmTypeStr: an empty name removes the property so GetAlgorithmName() falls back |
| 495 | // to the bare prefix. A stored empty StringProperty would shadow that fallback and make the first |
| 496 | // AddToolUse append "|<tool>" instead of ": <tool>". |
| 497 | this->RemoveProperty("algorithm_name"); |
| 498 | return; |
| 499 | } |
| 500 | |
| 501 | mitk::StringProperty* property = dynamic_cast<mitk::StringProperty*>(this->GetProperty("algorithm_name")); |
| 502 | if (property != nullptr) |
| 503 | // Update Property |
| 504 | property->SetValue(algoName); |
| 505 | else |
| 506 | // Create new Property |
| 507 | SetStringProperty("algorithm_name", algoName.c_str()); |
| 508 | } |
| 509 | |
| 510 | std::string mitk::Label::GetAlgorithmName() const |
| 511 | { |