I was passing the wrong arguments. I tried to pass the arguments as in the GitHub example.
antsRegistration.antsRegistrationLogic().process([{'transformParameters': {'transform': 'Rigid', 'settings': '0.1'}, 'metrics': [{'type': 'MI', 'fixed': '/tmp/Slicer-srivathsan/vtkMRMLScalarVolumeNode1.nrrd', 'moving': '/tmp/Slicer-srivathsan/vtkMRMLScalarVolumeNode2.nrrd', 'settings': '1,32,Regular,0.25'}], 'levels': {'steps': [{'convergence': 1000, 'smoothingSigmas': 4, 'shrinkFactors': 12}, {'convergence': 500, 'smoothingSigmas': 3, 'shrinkFactors': 8}, {'convergence': 250, 'smoothingSigmas': 2, 'shrinkFactors': 4}, {'convergence': 0, 'smoothingSigmas': 1, 'shrinkFactors': 2}], 'smoothingSigmasUnit': 'vox', 'convergenceThreshold': 6, 'convergenceWindowSize': 10}, 'masks': {'fixed': None, 'moving': None}}, {'transformParameters': {'transform': 'Affine', 'settings': '0.1'}, 'metrics': [{'type': 'MI', 'fixed': None, 'moving': None, 'settings': '1,32,Regular,0.25'}], 'levels': {'steps': [{'convergence': 1000, 'smoothingSigmas': 4, 'shrinkFactors': 12}, {'convergence': 500, 'smoothingSigmas': 3, 'shrinkFactors': 8}, {'convergence': 250, 'smoothingSigmas': 2, 'shrinkFactors': 4}, {'convergence': 0, 'smoothingSigmas': 1, 'shrinkFactors': 2}], 'smoothingSigmasUnit': 'vox', 'convergenceThreshold': 6, 'convergenceWindowSize': 10}, 'masks': {'fixed': None, 'moving': None}}, {'transformParameters': {'transform': 'SyN', 'settings': '0.1,3,0'}, 'metrics': [{'type': 'MI', 'fixed': None, 'moving': None, 'settings': '1,32'}], 'levels': {'steps': [{'convergence': 100, 'smoothingSigmas': 5, 'shrinkFactors': 10}, {'convergence': 100, 'smoothingSigmas': 3, 'shrinkFactors': 6}, {'convergence': 70, 'smoothingSigmas': 2, 'shrinkFactors': 4}, {'convergence': 50, 'smoothingSigmas': 1, 'shrinkFactors': 2}, {'convergence': 0, 'smoothingSigmas': 0, 'shrinkFactors': 1}], 'smoothingSigmasUnit': 'vox', 'convergenceThreshold': 6, 'convergenceWindowSize': 10}, 'masks': {'fixed': None, 'moving': None}}], {'transform': None, 'volume': '/tmp/Slicer-srivathsan/BFCDJ_vtkMRMLScalarVolumeNode3.nrrd', 'interpolation': 'Linear'}, {'initializationFeature': 1}, {'dimensionality': 3, 'histogramMatching': 0, 'winsorizeImageIntensities': [0.005, 0.995], 'computationPrecision': 'float'})
Though it fixed the previous issue, now I get the following error,
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/srivathsan/Slicer-4.13.0-2022-04-17-linux-amd64/NA-MIC/Extensions-30785/SlicerANTs/lib/Slicer-4.13/qt-scripted-modules/antsRegistration.py", line 517, in process
self.getOrSetCLIParam(stages[0]['metrics'][0]['fixed']) # put in first position. will be used as reference in cli
File "/home/srivathsan/Slicer-4.13.0-2022-04-17-linux-amd64/NA-MIC/Extensions-30785/SlicerANTs/lib/Slicer-4.13/qt-scripted-modules/antsRegistration.py", line 599, in getOrSetCLIParam
nodeID = mrmlNode.GetID()
AttributeError: 'str' object has no attribute 'GetID'
Appreciate any help on this.