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

ENH: Check input for antsApplyTransforms matches dimensionality #1694

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Mar 10, 2024

This checks that scalar input to antsApplyTransforms is actually an N-dimensional scalar image, and if it's not, exit with error advising users to use the correct input flag with -e.

It's my opinion that it's wise to inform users of fatal errors even if they don't use --verbose, but if that's going to break anything I can hide the error message for non-verbose execution.

@cookpa cookpa linked an issue Mar 10, 2024 that may be closed by this pull request
@cookpa
Copy link
Member Author

cookpa commented Mar 11, 2024

Just noticed this elsewhere in the code. Might have to adapt the checks to only operate on actual files

  // BA - code below creates problems in ANTsR
  //  itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO(
  //                                                            filename.c_str(),
  //                                                            itk::ImageIOFactory::FileModeType::ReadMode );
  //  dimension = imageIO->GetNumberOfDimensions();

@cookpa cookpa marked this pull request as draft March 11, 2024 03:59
@cookpa cookpa marked this pull request as ready for review March 18, 2024 15:43
@cookpa cookpa merged commit 2236a75 into master Mar 19, 2024
2 checks 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.

antsApplyTransforms should check input type
1 participant