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

Function SetDicomTag

Modules/PET/test/mitkSUVInputModelTest.cpp:43–51  ·  view source on GitHub ↗

Set a DICOM tag value on the image (top-level tag, no sequence).

Source from the content-addressed store, hash-verified

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).

Calls 4

NewFunction · 0.50
SetValueMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected