question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transform_from_displacement_field does not return anything

See original GitHub issue

I’m using ANTsPy 0.2.0 downloaded as a .whl from the releases page.

It seems currently that there is no way to load a deformable transform (saved as the result of a registration) into a transform object. The function transform_from_displacement_field appears it should convert such a deformation field loaded as an image into one of these transforms - but currently it just returns None.

Is there a way to load a displacement field (So I can do things like transform.apply_to_point with my deformation field)?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ntustisoncommented, May 3, 2020

Hey @stnava , just ran into this in trying to port my ported ANTsR version of your data augmentation code (currently in ANTsPyNet). Linear works and the simulated displacement field stuff is there but the displacement field-to-transform part is lacking. After the busy part of this week is over, I’ll probably revisit this and might bug you for some more information.

1reaction
stnavacommented, Oct 2, 2019

One of the notebook examples illustrates how to use that and the version for transforming points

On Wed, Oct 2, 2019 at 6:10 PM brian avants stnava@gmail.com wrote:

See ants.apply_transforms

On Wed, Oct 2, 2019 at 5:55 PM reynoldscem notifications@github.com wrote:

Sorry I think our wires are crossed here. The transforms are on disk, stored as Warp.nii.gz files. The problem is that I cannot load & convert them into the format which the apply_* functions want.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsPy/issues/88?email_source=notifications&email_token=AACPE7S55F7QBQ6O4PIDPYDQMUKEHA5CNFSM4I43SRDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGKAZI#issuecomment-537698405, or mute the thread https://github.com/notifications/unsubscribe-auth/AACPE7RMQWPHH7WGMZ25LNTQMUKEHANCNFSM4I43SRDA .

brian

brian

Read more comments on GitHub >

github_iconTop Results From Across the Web

compose 2 dense displacement field problem · Issue #1291
Hi,. I want to compose 2 dense displacement field T1 , T2 like below: T2(T1(A)) = B I used sitk.CompositeTransform to comose them:...
Read more >
Extracting displacement fields from rigid registration
Once I have a registration, what is the best way to extract the deformation field (a.k.a. displacement field) with ITK Python?
Read more >
Advanced Normalization Tools ( ANTs ) Discussion
I think it is because internal process of antsApplytransforms of displacement field is not simply shifting points in the moving image and ...
Read more >
Resizing displacement field from imregdemons does not ...
I'm trying to register two images (m = moving image to be transformed, s = static reference image) by estimating a displacement field...
Read more >
Creating an ITK displacement field image from a numpy array
It seems like it's asking for: itk.Image[itk.Vector[itk.D,3],3]. Not a numpy array. Or maybe your numpy array has the wrong dimensionality.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found