Skip to content

Commit

Permalink
Merge pull request #1821 from ANTsX/antsai_write_com_affine
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpa authored Dec 15, 2024
2 parents ee84001 + 02205d3 commit 03135c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Examples/antsAI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1098,10 +1098,12 @@ antsAI(itk::ants::CommandLineParser * parser)
}
else if (initialTransformInitializedWithImages == true)
{
using TranslationTransformType = itk::TranslationTransform<RealType, ImageDimension>;
typename TranslationTransformType::Pointer bestTranslationTransform = TranslationTransformType::New();
bestTranslationTransform->SetOffset(initialTransform->GetOffset());
transformWriter->SetInput(bestTranslationTransform);
// write the translation transform as a rigid transform, to be consistent with antsRegistration
typename RigidTransformType::Pointer bestRigidTransform = RigidTransformType::New();
bestRigidTransform->SetCenter(initialTransform->GetCenter());
bestRigidTransform->SetMatrix(initialTransform->GetMatrix());
bestRigidTransform->SetOffset(initialTransform->GetOffset());
transformWriter->SetInput(bestRigidTransform);
}

transformWriter->SetFileName(outputName.c_str());
Expand Down

0 comments on commit 03135c4

Please sign in to comment.