Skip to content

Commit 8bedb82

Browse files
hjmjohnsonclaude
andcommitted
COMP: Fix missing include path and nodiscard warning
Add the module's include/ directory to the src/ executables' include path so that itkVariationalRegistrationMultiResolutionFilter.h and other module headers are found during the CTest dashboard build. Also fix the nodiscard warning on TransformPhysicalPointToContinuousIndex in itkContinuousBorderWarpImageFilter.hxx by throwing an exception when the physical point falls outside the image domain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1f91659 commit 8bedb82

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

include/itkContinuousBorderWarpImageFilter.hxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ ContinuousBorderWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>::
7272
}
7373

7474
// project point into image region
75-
inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex);
75+
if (!inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex))
76+
{
77+
itkExceptionMacro("Physical point " << point << " is outside the image domain");
78+
}
7679

7780
for (unsigned int j = 0; j < ImageDimension; j++)
7881
{

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include_directories("${VariationalRegistration_SOURCE_DIR}/include")
12
include_directories("${VariationalRegistration_SOURCE_DIR}/src")
23

34
# Test if ITK is built with FFTW. FFTWD is recommended and required for the

0 commit comments

Comments
 (0)