Scripting Dicom load

Operating system: Windows 10

Slicer version: 4.8.1

Expected behavior/Goal: Load DICOMS --> Show Scene --> Rigid Register them --> Export as nifti’s to an output dir

Programming Level: Beginner

Actual behavior: Imported DICOMLib, used importDicom function - got a True!

Problem: Scene didn’t change? Also lost on how to programmatically perform affine registration. (I see the gui and can do this using that. But I have a lot of images and want to just make it so I can for loop through the directory of images). I understand the for looping through dir part, I am lost on the getting Slicer to do its part.

DICOM importing and loading are two separate steps. Import step: add files into Slicer’s DICOM database. Loading step: load data from DICOM database to the scene.

Details on how to do each step has been discussed before in several topics, such as Load DICOM series using python. If you cannot find answer to some questions in any of the topics, examples, or documentation then let us know.