| 604 | |
| 605 | |
| 606 | void mitk::Label::Update(const Label* templateLabel, bool updateLabelValue) |
| 607 | { |
| 608 | if (nullptr == templateLabel) |
| 609 | mitkThrow() << "Invalid call of Label::Update. Passed label is null."; |
| 610 | |
| 611 | auto keys = templateLabel->GetPropertyKeys(); |
| 612 | for (const auto& key : keys) |
| 613 | { |
| 614 | auto destProp = templateLabel->GetConstProperty(key)->Clone(); |
| 615 | this->SetProperty(key, destProp); //The implementation of SetProperty ensures |
| 616 | //that only the content will be assigned if |
| 617 | //key does already exist. |
| 618 | } |
| 619 | |
| 620 | if (updateLabelValue) |
| 621 | this->SetValue(templateLabel->GetValue()); |
| 622 | } |
| 623 | |
| 624 | void mitk::Label::SetDICOMCodeSequenceAsProperties(const PropertyKeyPath& basePath, |
| 625 | const DICOMCodeSequence& code, |