Skip to content

Commit

Permalink
ENH: Avoid setting a negative spacing to test exception
Browse files Browse the repository at this point in the history
Avoid setting a negative spacing to test the moving transform
displacement field region and the fixed image domain mismatch exception.
  • Loading branch information
jhlegarreta authored and dzenanz committed Dec 6, 2021
1 parent f5898b9 commit 5f85a5d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -594,7 +594,7 @@ itkImageToImageMetricv4Test(int, char ** const)

// Test that using a displacemet field that does not match the virtual
// domain space will throw an exception.
field->SetSpacing(fixedImage->GetSpacing() * -1.0);
field->SetSpacing(fixedImage->GetSpacing() * 2.0);
std::cout << "Testing with displacement field in different space than "
<< "fixed image:" << std::endl;
ITK_TRY_EXPECT_EXCEPTION(metric->Initialize());
Expand Down

0 comments on commit 5f85a5d

Please sign in to comment.