Hi all,
I had the same problem. I tried to OVERWRITE next tag
(0008,1060) UN 34\00 # 2, 1 NameOfPhysiciansReadingStudy
But for some reason when this tag has a value like "34\00", dcmodify shows an error
Code: Select all
nicolas@nicolas:~/Escritorio$ dcmodify -d -i "(0008,1060)=HOLA" CR_1.dcm
I: Processing file: CR_1.dcm
I: Loading file into dataset manager: CR_1.dcm
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
I: Getting dataset from loaded file: CR_1.dcm
I: Executing (option|path|value): i|(0008,1060)|HOLA
E: modifying tag in file CR_1.dcm: Corrupted data
I: Renamed backup file to original
I: ------------------------------------
E: There was 1 error
Sometimes there is no error message and the option " -i " does not take effect.
So what I did is next :
Code: Select all
dcmodify -v -e "(0008,1060)" -i "(0008,1060)=DR NICOLAS" CR_1.dcm
That way I will erase the TAG with the value 34\00 to be able to insert the new one with the new value "DR NICOLAS" . But ...... What happen If the tag "(0008,1060)" does not exist ? We will see an error "TAG NOT FOUND" , so to avoid this message we can use the option " -imt "
-imt means :
Code: Select all
other processing options:
-imt --ignore-missing-tags treat 'tag not found' as success
when modifying or erasing in datasets
So the complete sentence is like next :
Code: Select all
dcmodify -v -imt -e "(0008,1060)" -i "(0008,1060)=DR NICOLAS" CR_1.dcm
That worked pretty good to me : )
Anyway I would to know what is wrong with those kind of files.
What this value means "" 34\00 ""
Please notice that
The option -imt is not available in the next dcmtk version
dcmodify v3.5.4 2005-12-20
So I had to update to the next version
dcmodify v3.6.0 2011-01-06
Regards,
Nicolás