Operating system: Windows 10
Slicer version: Slicer 4.8.1
Hi,
I am writing a simulator which requires the registration of CT and MRI images. I am satisfied with Fiducial Registration; however, the steps required to perform this procedure may be intensive to the user (Registration -> Specialized -> Fiducial Registration -> Fixed Landmarks -> Moving Landmarks -> Save Transform -> Apply)
I would like to automate this registration procedure (implement it programmatically) to simplify the U/I steps (I would still require the user to create the markups manually). Is there some code snippet for automating the Fiducial Registration module and setting its respective parameters? I went through the ScriptRepository Documentation but couldn’t find what I was looking for.
Once you’ve figured out a complete processing workflow and you would like to perform it many times or you would like inexperienced users to reproduce the workflow then writing a custom Python scripted module is a good idea. I would strongly recommend to not require users to create any nodes manually. You can save all the nodes that your module is using into a scripted parameter node - see more details here.
How to use this module from cmd. It is not clear how to provide the landmarks as input ordered list arguments and it would be nice to add this to the module wiki. I tried:
You can run a CLI from the GUI and see in application log what command was used. If you enable developer mode in application settings then all input and output files are preserved after running a CLI module, so you can inspect file content, too.