I’d like to add an already calculated elastix transform file(txt) to Slicer. However, when I try to add the file to Slicer using the “Add Data” screen, it fails almost silently.
Unfortunately, elastix uses its own transformation file format, but you can use the readElastixTransformToVTK
function we implemented in SlicerElastix to read an elastix transform. It only supports linear and bspline components.
To make things simpler, you can add your registration parameter set file to SlicerElastix preset list and run Elastix from Slicer. Then the module automatically imports the output transform file into Slicer.
Compared with the volume create with the SlicerElastix module, there is a huge difference with aplling the transform.
the mrb file (4.11.0-2020-06-17 r29154 / 2a9d59c)
https://c-t.work/s/1f0cca770c1642
42majh ( 24h)
It all looks good except:
- non-linear transforms are only reflected in volume rendering if you harden the transform on the volume
- automatic intensity-based registration methods typically cannot converge if initial rotation error was more than a few ten degrees; you can fix this by pre-aligning the volumes by an approximate landmark registration using 3-4 points (using Fiducial registration wizard module of SlicerIGT):
The referenced EditTransform
function just modifies parts of a transform file, it cannot transform 3D objects.