Alignment accuracy - #283
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07e6cad8e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38ff84ace4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| output[[paste0("plot_matte_map", i)]] <- renderPlot({ | ||
| if (!suppressWarnings(!is.matrix(cur_alignment_image))) { | ||
| cur_alignment_image <- | ||
| cur_alignment_image[nrow(cur_alignment_image):1,] |
There was a problem hiding this comment.
Skip empty Matte maps in the manual UI
For raw-image manual registrations with method == "Non-Rigid", the C++ path calls alignImagesTPS() and never fills accuracyMatte, so the new Matte map output is a 0x0 matrix. This plot treats any matrix as drawable and then indexes nrow(cur_alignment_image):1, which becomes 0:1 and raises a subscript error when the Matte map tab is opened; guard on nonzero dimensions or return NULL for that method.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09a3cc69f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 194e272cf5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d7d18b184
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d68a1e8578
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0c37390ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b70e84da37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 798b990e82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2abeb0abf0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2357050ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isValidRange(fixedRange)) { | ||
| throw std::invalid_argument("Invalid fixed intensity range."); | ||
| } | ||
| if (!isValidRange(movingRange)) { | ||
| throw std::invalid_argument("Invalid moving intensity range."); |
There was a problem hiding this comment.
Return a missing map for collapsed percentile ranges
When either overlap image is constant or sufficiently background-dominated that its 0.5th and 99.5th percentiles are equal, this branch throws Invalid fixed intensity range (with the equivalent failure for the moving image). Such inputs can still produce a registered image and the scalar Matte metric already represents this case as NaN, but the optional map now aborts the entire automated or manual registration; return an all-NaN map or fall back to a usable range instead.
Useful? React with 👍 / 👎.
|
@claude review, give me a list of missing modifications before merge |
This comment was marked as outdated.
This comment was marked as outdated.
|
@claude review again, this time scan the entire package and check if there are things I missed to update in the entire package regarding this particular PR. |
|
Claude finished @Artur-man's task in 8m 36s —— View job Package-wide review — what's still missing before merge
First, what's already handled — most of the earlier Codex feedback landed: Below is what I'd still want fixed, ordered by risk. Blockers1. tmp[tmp < 0] <- 0
2. if (global.validPairs == 0U) throw std::invalid_argument("The mask contains no valid pixels.");
if (!isValidRange(fixedRange)) throw std::invalid_argument("Invalid fixed intensity range.");
if (!isValidRange(movingRange)) throw std::invalid_argument("Invalid moving intensity range.");Zero overlap (bad homography, landmarks outside the field) and constant-intensity overlap (blank/background-only channel) are all reachable on real data, and each aborts the whole registration via Rcpp. The scalar 3.
4. SimpleITK path builds a malformed reg$alignment_stats$fine[names(tfx$alignment_metrics)] <- tfx$alignment_metricsOn this path High5. Three of the new keypoint metrics ignore the y axis. 6. TPS-only mapping still reaches For manual 7. cv::normalize(hist1, hist1, 0, 1, cv::NORM_MINMAX);
hist1 /= cv::sum(hist1)[0];The min-max step forces the least-occupied occupied bin to exactly 8.
Medium — package-wide gaps (the "did I miss anything" part)9. The non-interactive path computes the new QC and throws it away. 10. No test touches any of the new code. 11. Two exported functions changed signature with no deprecation and no
Either append the new arguments / keep a deprecated 12. img_data <- magick::image_data(img, channels = "gray") # 1 channel
SimpleITK::as.image(img_data, isVector = TRUE)
13. For the manual coordinate path 14. Matte map orientation vs the returned image. Low / cleanup
Suggested merge gate: items 1–4 (each errors on ordinary input), then 5–7 (the reported numbers are wrong), then 9–11. I did not implement any of these — this was a review pass, as requested. Happy to take any subset if you want them applied. I could not compile or run |
No description provided.