From e78b70e594b8eda8e6b92a1d91c2eb8732d1766d Mon Sep 17 00:00:00 2001 From: Anthony Lombardi Date: Tue, 12 Mar 2024 14:01:47 -0400 Subject: [PATCH] BUG: Fix out of bounds NCC value in viewport clipping Regression introduced in 4704f9b ("BUG: Clip bounds of DRR projection to the bounds of the radiograph", 2023-11-01). Previously whenever a volume was outside the bounds of a radiograph image the NCC value would be appended as 0. In this case it is possible that the PSO could try to move the volume to be outside the bounds of all the radiographs. --- libautoscoper/src/Tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libautoscoper/src/Tracker.cpp b/libautoscoper/src/Tracker.cpp index 63b19e71..831b6f8a 100644 --- a/libautoscoper/src/Tracker.cpp +++ b/libautoscoper/src/Tracker.cpp @@ -582,7 +582,7 @@ std::vector Tracker::trackFrame(unsigned int volumeID, double* xyzypr) c double viewport[4]; if (!this->calculate_viewport(modelview, *views_[i]->camera(), viewport)) { std::cerr << "Tracker::trackFrame(): Volume " << volumeID << " is not in view of camera " << i << std::endl; - correlations.push_back(0.0); + correlations.push_back(9999.0); continue; }