1
14
15"""
16Usage:
17
18 python
19"""
20
21import gdcm
22import sys
23
24filename = sys.argv[1]
25tmpfile = "/tmp/philips_rescaled.dcm"
26
27
28
30reader.SetFileName( filename )
31if not reader.Read():
32 sys.exit(1)
33
34ds = reader.GetFile().GetDataSet()
35
36
37
38
39
40
43print tag1
44print tag2
45
46
47
49print el1
51print el2
52
53
54
55
58
59ds.Insert( el1 )
60ds.Insert( el2 )
61
63w.SetCheckFileMetaInformation( False )
64w.SetFileName( tmpfile )
65w.SetFile( reader.GetFile() )
66if not w.Write():
67 sys.exit(1)
68
69print "success"
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
Class to represent a Private DICOM Data Element (Attribute) Tag (Group, Element, Owner)
Definition gdcmPrivateTag.h:39
Reader ala DOM (Document Object Model)
Definition gdcmReader.h:54
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
Writer ala DOM (Document Object Model)
Definition gdcmWriter.h:49