Computer Vision News - November 2021
60 Medical Imaging Tool We are at the end of another article and it’s time for you to try out your own Python scripts on Slicer . If you want to explore further this subject or you would like to initiate a discussion/ review on another software, please feel free to get in touch with the editors. Meanwhile, enjoy the rest of the November mag! itemTransform = slicer.util.loadTransform(itemTransform_filename) outputSEG_filename = filename_dir+'registered_segs/seg + str(i) + '.nii' SEGresampledNode = slicer.vtkSlicerVolumesLogic().CloneVolumeGeneric(slicer.mrmlS cene, itemSEG, 'out', True) SEGparameters = {'inputVolume': itemSEG, 'referenceVolume': itemMR, 'outputVolume':SEGresampledNode,'warpTransform': itemTransform, 'interpolationMode': 'NearestNeighbor'} slicer.cli.runSync(slicer.modules.brainsresample, None, SEGparameters) slicer.util.saveNode(SEGresampledNode, outputSEG_filename) outputCT_filename = filename _dir+'registered_cts/ct' + str(i) + '.nii' CTresampledNode = slicer.vtkSlicerVolumesLogic().CloneVolumeGeneric(slicer.mrmlS cene, itemCT, 'out', True)
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=