[Elastix] Transitivity calculation using elastix

Kierkels, RGJ (rt) r.g.j.kierkels at umcg.nl
Tue Aug 9 22:18:19 CEST 2016


Hi Floris (and Stefan),

Thanks a lot for the full explanation below including the remarks. The method worked well as described for both the transitivity as well as the inverse consistency (mentioned by Stefan). To what extend is your proposed implementation different from using transformix as follows: pass all T trough transformix with ‘-def all’, then pass the  resulting vector fields with  ‘-in inputImage’ through transformix (for x,y and z) using T_CA, T_BC, T_AB, then sum the resulting vector fiels? I acknowledge that this would require many runs of transformix as compared to the method using InitialTransformParametersFileName.

Another related question: How should I setup my transformix for the following: having 3 images A, B and C  I would like to define the coordinates in ImgC when following the voxels in ImgA via T_AB to ImgB, then via T_CB to ImgC. Thus, for a voxel in ImgA going back with T_AB to the original location in the moving image ImgB and then taking the same voxel from ImgB to ImgC.

Elastix was used 2 times with:
ImgA (fixed) – ImgB(moving) : T_AB.txt
ImgB (fixed) – ImgC(moving) : T_BC.txt

In this setup there is no transformation between ImgA and ImgC. Furthermore, I’m not sure if the invert of  T_BC, (T_BC)^-1 should be used.
Hopefully the explanation is a bit clear.

Thanks again,

Best regards,
Roel


Van: floris.berendsen at gmail.com [mailto:floris.berendsen at gmail.com] Namens Floris Berendsen
Verzonden: maandag 8 augustus 2016 10:47
Aan: Kierkels, RGJ (rt)
CC: elastix at bigr.nl
Onderwerp: Re: [Elastix] Transitivity calculation using elastix

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

________________________________
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bigr.nl/pipermail/elastix/attachments/20160809/54cd6ef5/attachment-0001.html>


More information about the Elastix mailing list