Use Elastix inside my module

Most Python scripted modules contain test that serves as an example of how to use the module from without its user interface, from another Python script.

For Elastix, the test/example is here:

Note that when you use it from another module then you have to import the Elastix first and use the Elastix namespace. For example, to get the logic:

import Elastix
logic = Elastix.ElastixLogic()

To use an atlas, add the atlas to the scene right before the registration and then remove it from the scene once the registration is completed. You can keep the volume node in memory in a Python variable so that you don’t need to load it each time you run the registration.