Skip to content

Conversation

@N-Dekker
Copy link
Member

Aims to fix build errors that occur when USE_ImpactMetric is OFF, saying:

elastix\Components\Metrics\Impact\itkBSplineInterpolateVectorImageFunction.h(40,10): error C1083: Cannot open include file: 'torch/torch.h': No such file or directory

@vboussot Please check if this fix works for you as well!

Aims to fix build errors that occur when USE_ImpactMetric is OFF, saying:

    elastix\Components\Metrics\Impact\itkBSplineInterpolateVectorImageFunction.h(40,10): error C1083: Cannot open include file: 'torch/torch.h': No such file or directory
@vboussot
Copy link

I tested the fix and it works for me

With -DELASTIX_USE_GTEST=ON and USE_ImpactMetric=OFF, the build was indeed failing before, and it no longer does.

For the tests, it might be good to wrap the Impact-related ones in an if(USE_ImpactMetric) so they are only included when Impact is enabled.

@N-Dekker N-Dekker marked this pull request as ready for review December 15, 2025 12:29
@N-Dekker N-Dekker merged commit 2fb09c3 into main Dec 15, 2025
8 checks passed
@N-Dekker N-Dekker deleted the Only-build-elxImpactMetricGTest-when-USE_ImpactMetric-is-ON branch December 15, 2025 12:29
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.

3 participants