users
users > RE: Can I use CMTK to register segmented/label files?
May 1, 2018 06:05 AM | Torsten Rohlfing
RE: Can I use CMTK to register segmented/label files?
Hi Alejandra -
Yes, in general it is possible to use label images for registration with CMTK's tools. I am going to explain using registrationx, but almost everything should translate entirely for warpx, and to lesser degree for the older registration and warp tools.
The first thing to do is to tell CMTK that an image is a label image, not a greyscale image. For the reference image, you can do that by adding "--class-ref label" to the command line, and for the floating image by adding "--class-flt label".
The second thing to understand is that only histogram-based similarity measures can be used as registration metrics if one or both images are label images. You can select one of the supported metrics by adding one of the following to the command line: "--nmi" for normalized mutual information (this is actually the default anyway), "--mi" for plain mutual information, or "--cr" for the "Correlation Ratio". The last of these will only work if the floating image is still a greyscale image (and there's a good chance it's the other way around), so I would recommend staying with NMI.
Finally, you need to select an interpolation method that is compatible with label data. I recommend partial volume interpolation (add "--partial-volume" to the command line) for best accuracy, but nearest neighbor (add "--nearest-neighbor") is also valid and may be faster.
A word of caution - while the above technically will make CMTK handle label data properly, you may find the registration to be a lot less robust or accuracte using label than intensity data. That's because there is obviously a lot less structure in the label data to work with. That is particularly a problem with nonrigid registration (using warpx), where there is simply nothing inside each labeled object that could be used to drive the alignment. So instead, you will likely see rather weird deformations inside larger structures. TO avoid that, I would recommend keeping the B-spline grid spacing a coarse as possible, and also making the deformation "stiff" by increasing either the grid energy constraint (using "--smoothness-constraint-weight") or the Jacobian-based volume-preservation constraint (using "--jacobian-constraint-weight").
Hope this is helpful and will get you started.
Best,
Torsten
Yes, in general it is possible to use label images for registration with CMTK's tools. I am going to explain using registrationx, but almost everything should translate entirely for warpx, and to lesser degree for the older registration and warp tools.
The first thing to do is to tell CMTK that an image is a label image, not a greyscale image. For the reference image, you can do that by adding "--class-ref label" to the command line, and for the floating image by adding "--class-flt label".
The second thing to understand is that only histogram-based similarity measures can be used as registration metrics if one or both images are label images. You can select one of the supported metrics by adding one of the following to the command line: "--nmi" for normalized mutual information (this is actually the default anyway), "--mi" for plain mutual information, or "--cr" for the "Correlation Ratio". The last of these will only work if the floating image is still a greyscale image (and there's a good chance it's the other way around), so I would recommend staying with NMI.
Finally, you need to select an interpolation method that is compatible with label data. I recommend partial volume interpolation (add "--partial-volume" to the command line) for best accuracy, but nearest neighbor (add "--nearest-neighbor") is also valid and may be faster.
A word of caution - while the above technically will make CMTK handle label data properly, you may find the registration to be a lot less robust or accuracte using label than intensity data. That's because there is obviously a lot less structure in the label data to work with. That is particularly a problem with nonrigid registration (using warpx), where there is simply nothing inside each labeled object that could be used to drive the alignment. So instead, you will likely see rather weird deformations inside larger structures. TO avoid that, I would recommend keeping the B-spline grid spacing a coarse as possible, and also making the deformation "stiff" by increasing either the grid energy constraint (using "--smoothness-constraint-weight") or the Jacobian-based volume-preservation constraint (using "--jacobian-constraint-weight").
Hope this is helpful and will get you started.
Best,
Torsten
Threaded View
Title | Author | Date |
---|---|---|
Alejandra Boronat | Apr 30, 2018 | |
Torsten Rohlfing | May 1, 2018 | |
Torsten Rohlfing | May 1, 2018 | |