Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElastixRegistrationMethod.ConvertToItkTransform support external initial transforms #949

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

N-Dekker
Copy link
Member

When ConvertToItkTransform has converted the CombinationTransform produced by a registration that used an external initial transform, the result should be an itk::CompositeTransform that has a pointer to the initial transform as its "back transform".

Follow-up on a comment by Dženan Zukić (@dzenanz) at InsightSoftwareConsortium/ITKElastix#241 (comment)

The template argument `TComponentType` was originally copied from `DeformationFieldInterpolatingTransform` but appears unnecessary.
Added a `const` GetModifiableExternalTransform() member function to `AdvancedTransformAdapter`.

Paves the way to add ExternalTransform support to `ConvertToItkTransform` (which returns a non-const Transform).
When `ConvertToItkTransform` has converted the CombinationTransform produced by a registration that used an external initial transform, the result should be an `itk::CompositeTransform` that has a pointer to the initial transform as its "back transform".
Copy link
Contributor

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance.

@N-Dekker N-Dekker marked this pull request as ready for review August 22, 2023 20:00
@N-Dekker N-Dekker merged commit 601f465 into main Aug 22, 2023
@N-Dekker N-Dekker deleted the ConvertExternalTransform branch August 22, 2023 20:05
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Sep 15, 2023
Supports passing a transform retrieved by `GetCombinationTransform()` or
`GetNthTransform(n)` to `ConvertToItkTransform`, when an _external_ initial
transform was specified before running the registration.

Also including various performance improvements.

Including:

  pull request SuperElastix/elastix#946
  commit SuperElastix/elastix@7bcb2b3
  ENH: Write external initial transforms to ITK transform file

  pull request SuperElastix/elastix#949
  commit SuperElastix/elastix@601f465
  ENH: `ConvertToItkTransform` should support external initial transform

  pull request SuperElastix/elastix#950
  commit SuperElastix/elastix@7e883bf
  ENH: Add GetInitialTransform() and GetExternalInitialTransform()

  pull request SuperElastix/elastix#959
  commit SuperElastix/elastix@3979978
  PERF: Speed up ComputeJacobianTerms access to `vnl_sparse_matrix`

  pull request SuperElastix/elastix#960
  commit SuperElastix/elastix@4d028f7
  PERF: Speed up full, grid, sparse mask samplers by a local sampleVector
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request Sep 18, 2023
Supports passing a transform retrieved by `GetCombinationTransform()` or
`GetNthTransform(n)` to `ConvertToItkTransform`, when an _external_ initial
transform was specified before running the registration.

Also including various performance improvements.

Including:

  pull request SuperElastix/elastix#946
  commit SuperElastix/elastix@7bcb2b3
  ENH: Write external initial transforms to ITK transform file

  pull request SuperElastix/elastix#949
  commit SuperElastix/elastix@601f465
  ENH: `ConvertToItkTransform` should support external initial transform

  pull request SuperElastix/elastix#950
  commit SuperElastix/elastix@7e883bf
  ENH: Add GetInitialTransform() and GetExternalInitialTransform()

  pull request SuperElastix/elastix#959
  commit SuperElastix/elastix@3979978
  PERF: Speed up ComputeJacobianTerms access to `vnl_sparse_matrix`

  pull request SuperElastix/elastix#960
  commit SuperElastix/elastix@4d028f7
  PERF: Speed up full, grid, sparse mask samplers by a local sampleVector
dzenanz pushed a commit to InsightSoftwareConsortium/ITKElastix that referenced this pull request Sep 19, 2023
Supports passing a transform retrieved by `GetCombinationTransform()` or
`GetNthTransform(n)` to `ConvertToItkTransform`, when an _external_ initial
transform was specified before running the registration.

Also including various performance improvements.

Including:

  pull request SuperElastix/elastix#946
  commit SuperElastix/elastix@7bcb2b3
  ENH: Write external initial transforms to ITK transform file

  pull request SuperElastix/elastix#949
  commit SuperElastix/elastix@601f465
  ENH: `ConvertToItkTransform` should support external initial transform

  pull request SuperElastix/elastix#950
  commit SuperElastix/elastix@7e883bf
  ENH: Add GetInitialTransform() and GetExternalInitialTransform()

  pull request SuperElastix/elastix#959
  commit SuperElastix/elastix@3979978
  PERF: Speed up ComputeJacobianTerms access to `vnl_sparse_matrix`

  pull request SuperElastix/elastix#960
  commit SuperElastix/elastix@4d028f7
  PERF: Speed up full, grid, sparse mask samplers by a local sampleVector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants