| 140 | namespace |
| 141 | { |
| 142 | void CopyIfPresent(mitk::MultiLabelSegmentation* seg, |
| 143 | const mitk::IPropertyProvider* source, |
| 144 | unsigned int group, unsigned int element, |
| 145 | bool overwrite) |
| 146 | { |
| 147 | const auto key = mitk::GeneratePropertyNameForDICOMTag(group, element); |
| 148 | const auto sourceProp = source->GetConstProperty(key); |
| 149 | if (sourceProp.IsNull()) |
| 150 | return; |
| 151 | if (!overwrite && seg->GetConstProperty(key).IsNotNull()) |
| 152 | return; |
| 153 | seg->SetProperty(key.c_str(), sourceProp->Clone()); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void mitk::DICOMSegmentationPropertyHelper::InheritPatientFromSource(MultiLabelSegmentation* seg, |
no test coverage detected