18 python MergeFile.py input1.dcm input2.dcm
20 It will produce a 'merge.dcm' output file, which contains all meta information from input1.dcm
21 and copy the Stored Pixel values from input2.dcm
22 This script even works when input2.dcm is a Secondary Capture and does not contains information
23 such as IOP and IPP...
29 if __name__ ==
"__main__":
35 r1.SetFileName( file1 )
40 r2.SetFileName( file2 )
47 r1.GetImage().SetDataElement( r2.GetImage().GetDataElement() )
50 w.SetFile( r1.GetFile() )
52 w.SetImage( r1.GetImage() )
54 w.SetFileName(
"merge.dcm" )