[Insight-users] Rewriting Dicom header entries

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Oct 16 04:05:43 EDT 2007


Hi Angela,

  Correct me if I am wrong, but doesn't DICOM actually clearly specify
that for a derived image (*), you have to set Image Type (0008,0008)
to DERIVED\PRIMARY.

  The process is fairly simple, if you derive an image (ie. read a
DICOM) and then writes it, ITK-gdcm will actually do the correct job
of marking it derived and setting up the Reference SOP Instance UID
for you. Otherwise you need to create an image from scratch, or
somehow disconnect from the source. But I'd be interested what is your
test case.

Thanks
-Mathieu
(*) as long as radiologist interpretation is not altered.

On 10/15/07, Angela Wang <Angela.Y.Wang at hsc.utah.edu> wrote:
> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>


-- 
Mathieu


More information about the Insight-users mailing list