Skip to content

Add antsApplyTransformsToTRX - #1960

Merged
cookpa merged 14 commits into
ANTsX:masterfrom
PennLINC:apply-transforms-trx
Mar 23, 2026
Merged

Add antsApplyTransformsToTRX#1960
cookpa merged 14 commits into
ANTsX:masterfrom
PennLINC:apply-transforms-trx

Conversation

@mattcieslak

Copy link
Copy Markdown
Contributor

Closes #1947

Description

This PR adds a command line executable antsApplyTransformsToTRX, which can apply ITK warps to streamline coordinates. This replaces a workflow that was similar to GIFTI, where we used to convert the coordinates to a csv and use antsApplyTransformsToPoints.

The ITK remote module buffers the coordinates so this ends up requiring very little memory, even with gigantic streamline datasets.

The TractographyTRX remote module needs an update to build with the most recent 6.0 beta, but the rest of this code is ready for review!

@cookpa

cookpa commented Mar 18, 2026

Copy link
Copy Markdown
Member

Thanks for this, are we waiting for the merge of InsightSoftwareConsortium/ITK#5955 ?

@mattcieslak

Copy link
Copy Markdown
Contributor Author

yes, and I was also wondering if you think it would be helpful to add TRX support anywhere else. I was thinking maybe adding trx support to PrintHeader so it can list all the metadata fields or something like that. It could be useful for testing that the metadata is carried forward into the resampled TRX

@cookpa

cookpa commented Mar 18, 2026

Copy link
Copy Markdown
Member

That's an interesting idea, PrintHeader is specialized for image data and it might be best to keep that interface as-is, since it's pretty widely used. It would be nice to have a related program that can handle "unstructured points" like GIFTI, TRX, etc.

@mattcieslak mattcieslak changed the title WIP: Add antsApplyTransformsToTRX Add antsApplyTransformsToTRX Mar 19, 2026
@cookpa

cookpa commented Mar 20, 2026

Copy link
Copy Markdown
Member

@mattcieslak is this ready to merge?

@mattcieslak

Copy link
Copy Markdown
Contributor Author

Yep, this is good to go!

@cookpa

cookpa commented Mar 23, 2026

Copy link
Copy Markdown
Member

Thanks very much. I will merge now but might edit some things before we make a release based on this

@cookpa
cookpa merged commit 87d35de into ANTsX:master Mar 23, 2026
1 check passed
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.

Add antsApplyTransformsToTRX

2 participants