<div dir="ltr">Good afternoon,<div><br></div><div>I am a fairly new SimpleITK user and had a question about modifying and exporting DICOMs using Python.</div><div><br></div><div>If, for example we start off with a 512x512x100 image, I would like to add a buffer zone around it with voxel values of -1000 making it a 600x600x100 image. </div><div><br></div><div><div>So for example, I can import the DICOM files:</div><div><br></div><div>import SimpleITK </div><div><div>def importDICOM(inputLocation):</div><div>    reader = SimpleITK.ImageSeriesReader()</div><div>    filenamesDICOM = reader.GetGDCMSeriesFileNames(inputLocation)</div><div>    reader.SetFileNames(filenamesDICOM)</div><div>    image = reader.Execute()</div><div>    return image</div></div></div><div><br></div><div>And I know that SimpleITK.GetArrayFromImage(image) will return a numpy array that I can manipulate to get said 600x600x100 image. </div><div><br></div><div>After I have my 600x600x100 image I would need to update the Meta Data gotten from SimpleITK.GetMetaData() and save it back as DICOMs. </div><div><br></div><div>I know there is a SimpleITK.WriteImage() function, however, there is no SimpleITK.SetMetaData() function so I was wondering what the best procedure would be.</div><div><br></div><div>Grateful for your help,</div><div>Gleb</div></div>