[Elastix] Transitivity calculation using elastix

S. Klein s.klein at erasmusmc.nl
Mon Aug 8 10:55:19 CEST 2016


add-on:

Roel, you said:

" The inverse consistency is straightforward following the instructions in the manual calculating the inverse of the transformation (chapter.6.1.6) ."

I don't think this section is relevant for it. To calculate inverse consistency, you would do something similar to what Floris is describing, but then using only two images.
Best, Stefan


On 08-08-2016 10:47, Floris Berendsen wrote:
Hi Roel,

I may misunderstand your aims or setup, but for the transivity error calculation I would use a setup in which you manipulate the InitialTransforms. In this setup you won't create 3 deformation fields that needs to be summed, but rather 1 deformation field that should be close to identity. Please double-check (anyone?) the order the chaining, since this is from the top of my head and mistakes are easy to make :)


Create 3 TransformationParameter files by the following elastix setups.
ImgA (fixed) , ImgB (moving): T_AB.txt
ImgB (fixed) , ImgC (moving): T_BC.txt
ImgC (fixed) , ImgA (moving): T_CA.txt

We expect:
T_CA o T_BC o T_AB ~= I

To make this functional composition for transformix, change the following lines in the resulting TransformationParameter files:

-- file T_CA.txt
(InitialTransformParametersFileName "T_BC.txt")
// Image specific
(FixedImageDimension ...) //take all ... from T_AB.txt (or define your own)
(MovingImageDimension ...)
(FixedInternalImagePixelType ...)
(MovingInternalImagePixelType ...)
(Size ...)
(Index ...)
(Spacing ...)
(Origin ...)
(Direction ...)
(UseDirectionCosines ...)
-- end

-- file T_BC.txt
(InitialTransformParametersFileName "T_AB.txt")
-- end

-- file T_AB.txt
(InitialTransformParametersFileName "NoInitialTransform")
-- end

To create a deformation field, which lies on the image grid of image A:
transformix -tp T_CA.txt -def all

This deformation field is expected to be close to Identity.

Some other things to keep in mind:
- You could do the same setup, but 'counter-clockwise'. This may give different total transivity error.
- If the transivity error is not zero, the total transivity error might be slightly different depending if you 'break' the loop on either image A, B or C.
- If images A, B and C do cover the exact same (anatomic) domains, the deformationfiels in some areas near the border of might not sum as one. In that case you might want to use a mask defining the areas covered by all thee transforms.

So, again please double check. I'm interested to know if this works out for you.

Best,
Floris

On Thu, Aug 4, 2016 at 9:44 PM, Kierkels, RGJ (rt) <r.g.j.kierkels at umcg.nl<mailto:r.g.j.kierkels at umcg.nl>> wrote:
Dear Elastix user,

For B-spline deformable registration evaluation I would like to calculate the inverse consistency and transitivity error. The inverse consistency is straightforward following the instructions in the manual calculating the inverse of the transformation (chapter.6.1.6) . The transitivity error requires transformations T between minimal 3 image sets: ImgA, ImgB and ImgC, having T1, T2 and T3. From each Tx the DVF was calculated using transformix. The transitivity error is then defined as the sum of all DVF. When there is no error the sum should be zero. It is however not correct to sum all DVF directly since their origin is on different images.

The registration problem is as follows (with ImgX’ = ImgX deformed):


1.      ImgA(moving) – ImgB(fixed) --> DVF_B and ImgA’ (on grid of ImgB)

2.      ImgA’(moving) – ImgC(fixed) --> DVF_C and ImgA’’ (on grid of ImgC)

3.      ImgA’’(moving) – ImgA(fixed) --> DVF_A (now ImgA’’’ should equal ImgA)

I would like to sum all DVFs in the grid of ImgB. Therefore, DVF_A (and DVF_C) should be shifted towards the ImgB grid (e.g. using the invese of DVF_B which should then be interpolated to ImgB?).

Is it possible with elastix/transformix to interpolate the DVF to the grid of another image as illustrated above? Perhaps using an InitialTransform? What approach should I follow? Any help is appreciated.

Best regards,
Roel




________________________________
De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht.

The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message.

_______________________________________________
Elastix mailing list
Elastix at bigr.nl<mailto:Elastix at bigr.nl>
http://lists.bigr.nl/cgi-bin/mailman/listinfo/elastix





_______________________________________________
Elastix mailing list
Elastix at bigr.nl<mailto:Elastix at bigr.nl>
http://lists.bigr.nl/cgi-bin/mailman/listinfo/elastix



--
Stefan Klein
+31 10 7043442
http://www.bigr.nl/people/StefanKlein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bigr.nl/pipermail/elastix/attachments/20160808/5a9ec44a/attachment-0001.html>


More information about the Elastix mailing list