-
Notifications
You must be signed in to change notification settings - Fork 2
Adding Elastix Nodes
An Elastix registration can be added by right clicking on a node and selecting 'Add new transform node'. In the window that appears next, select elastix and give the node a name.
This will open the menu of controls for elastix:

For the 'elastix installation directory' you will have to point to where your elastix installation is. If you haven't installed elastix yet - select the version you want from this page: https://elastix.lumc.nl/download.php and download the relevant file from github. Unzip it somewhere on your computer. Note: at the moment elastix versions 5.0.0 and lower are supported.
Adjust any settings you want - the details of these parameters can be found in the elastix manual, which you can download from the same place as elastix.
The 'Write transformed images via transformix?' checkbox toggles using transformix to write transformed images with the initial and final transform to the temporary directory. It should usually stay disabled, and only be enabled for debugging purposes if strange results are seen from the elastix registration.
At the bottom there are 4 checkboxes that allow you to crop your fixed/moving image and use a downsampled version of it. This is useful if you images are very large, as elastix cannot directly accept HDF5/N5 file formats and these images will be written again to your temporary folder. Cropping can also be useful to remove features in an image which are not relevant to the registration.
Cropping
If you choose to crop, a dialog will appear to give your crop a name (to allow it to be re-used in later registrations).

Then the cropping overlay will appear:

The crop area can be adjusted using the sliders on the menu to the left, or by dragging the corners of the green square on the viewer. Make sure you adjust the crop in 3D i.e. its xy and z extent. Clicking 'Ok' in the menu to the left will accept the crop.
Downsampling
If you chose to downsample, a menu will appear allowing you to choose which resolution level of your image you want to use:

This is formatted as 'resolution level | x-y-z pixel dimensions | estimated size in GB' to give you some idea of how large the image will be when it is written to the temporary folder with any crops applied.
Elastix will then run (this can take some time! Be patient - especially with large images!) and a node will appear in the tree.