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

Method SetAlgorithmName

Modules/Multilabel/src/mitkLabel.cpp:490–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490void 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
510std::string mitk::Label::GetAlgorithmName() const
511{

Calls 4

emptyMethod · 0.45
RemovePropertyMethod · 0.45
GetPropertyMethod · 0.45
SetValueMethod · 0.45