pyelastix icon indicating copy to clipboard operation
pyelastix copied to clipboard

applying transform to other images

Open cabaker7 opened this issue 6 years ago • 9 comments

Sorry if this is not the appropriate forum, but does this wrapper provide methods for calling transformix from within Python? The pyelastix.register function outputs an image and a deformation field but deletes the temporary files used to determine the transformation, so I can't use the same transformation on a separate image set

cabaker7 avatar Jul 19 '18 21:07 cabaker7

Did you find a solution to this @cabaker7 ? I am having the same problem and I can't find a straightforward way to solve it

alfonmedela avatar Apr 06 '20 09:04 alfonmedela

@alfonmedela This is currently not implemented, but I will consider it high-priority in my next iteration with the code. Or... You are always welcome to submit a PR. 🙂

soupault avatar Apr 06 '20 10:04 soupault

Hello, I have the same problem. Have you solved it?

Iamlearn avatar Apr 27 '20 05:04 Iamlearn

I also have the same problem. Have you been able to implement it? thks :-)

philippe2toulouse avatar Sep 10 '20 08:09 philippe2toulouse

Any solution ? I used pyelastix to register two medical images, i wanna reproduce the same transformation on their respective masks(for segmentation purposes) , i cant find a way to exploit the resulting field to do so.

FakerAmine avatar Jun 29 '21 09:06 FakerAmine

Hello, @FakerAmine I think it might be possible to use the field and pass it somehow to another library like SimpleITK to generate a deformation field. However, I'm not sure how to do it, for the time being when I apply the deformation in this way the result is far from the expected, could be related to how the axes are defined. Not sure. Could also be other libraries to work with the numpy array directly, maybe scipy has something to work with this? I was working based on this with SimpleITK in case it is useful: https://github.com/SimpleITK/SimpleITK/issues/1285 If anyone can figure it out please share. I'll do the same.

Thanks

manuel-lincbiotech avatar Jul 08 '21 10:07 manuel-lincbiotech

@manuel-lincbiotech Thank you ! I will try doing that !

FakerAmine avatar Jul 08 '21 10:07 FakerAmine

Hello,

@FakerAmine, got any positive results using the SimpleITK route? I am facing the same issue right now.

Thanks

fabiopk avatar Aug 13 '21 14:08 fabiopk

Any solution ? I used pyelastix to register two medical images, i wanna reproduce the same transformation on their respective masks(for segmentation purposes) , i cant find a way to exploit the resulting field to do so.

pyelastix is really great for registration. But I solved the same problem as you mentioned using ANTsPy. You can follow this example for more information https://github.com/ANTsX/ANTsPy/blob/master/tutorials/concatenateRegistrations.ipynb

basicskywards avatar Sep 07 '21 00:09 basicskywards