[Insight-users] Rewriting Dicom header entries
Angela Wang
Angela.Y.Wang at hsc.utah.edu
Mon Oct 15 16:45:46 EDT 2007
I am trying to write two values into a DICOM header entry for my processed
image file. This one tag does not write my values. I am able, however, to
change other DICOM header entries. The tag is (0008,0008) for Image Iype
and takes type CS = code string.
The code looks like:
ReaderType::DictionaryArrayRawPointer dictPointer =
reader -> GetMetaDataDictionaryArray();
ReaderType::DictionaryRawPointer dict = (*dictPointer)[i];
itk::MetaDataDictionary & dictionary= *dict;
std::string tagkey, value;
tagkey = "0008|0008"; // Image Type vr = CS
value = "ORIGINAL\\SECONDARY";
itk::EncapsulateMetaData<std::string>(dictionary, tagkey, value);
Does anyone know how to make this work?
Thanks.
Angela
More information about the Insight-users
mailing list