users > RE: question regarding xform2scalar
Oct 25, 2014  12:10 AM | Torsten Rohlfing
RE: question regarding xform2scalar
Hi -

In general, you should be able to use "--inverse" with xform2scalar; it is certainly not expected to fail.

That said, depending on your specific xforms, failure may happen. Two things come to my mind:

a) there is a non-invertible transform in your xform list, e.g., a warp with a lot of folding.

b) you are mis-using the "--inverse" flag.

To elaborate on b) - the flag refers to the NEXT transformation in the list ONLY, not the entire list. So if you want every single one of the xforms inverted, you have to repeat the flag.

When you do that, you MUST also reverse the order of transformations. If you don't you will end up with a sequence where one xform likely maps your coordinate out of the domain of the next, and that would explain an all-zero result.

As an example, if you have

xform2scalar A.list B.list C.list

then to get the inverse you have to use

xform2scalar -- --inverse C.list --inverse B.list --inverse A.list

Also note that you may have to use a different InputImage. It is assumed that the coordinates of the input image pixels are within the domain of the first transformation in the chain. Best example, in the above, InputImage could be the source (fixed) image of A.list. But if you invert, then a valid InputImage would be the target (moving) image of the last xform in the chain, i.e., here the floating image of C.list.

And finally, in your example, you say "--mode component" - I assume that is a type; there is no such mode, but then you'd get an error if you tried that, not an all-zero image.

Hope this helps.

Best,
  Torsten

Threaded View

TitleAuthorDate
Jaguar Li Oct 24, 2014
RE: question regarding xform2scalar
Torsten Rohlfing Oct 25, 2014
Jaguar Li Oct 25, 2014
Torsten Rohlfing Oct 25, 2014