Set a DICOM tag value on the image (top-level tag, no sequence).
| 41 | |
| 42 | // Set a DICOM tag value on the image (top-level tag, no sequence). |
| 43 | void SetDicomTag(mitk::Image* image, unsigned int group, unsigned int element, |
| 44 | const std::string& value) |
| 45 | { |
| 46 | const std::string key = mitk::DICOMTagPathToPropertyName( |
| 47 | mitk::DICOMTagPath(group, element)); |
| 48 | auto prop = mitk::DICOMProperty::New(); |
| 49 | prop->SetValue(0, 0, value); |
| 50 | image->SetProperty(key.c_str(), prop); |
| 51 | } |
| 52 | |
| 53 | // Set a lifted private-tag property (the names BaseDICOMReaderService |
| 54 | // attaches for the Philips CNTS scale factors). |
no test coverage detected