[EsvIntersection]: Use bilinear interpolation instead of cell-based readout for seismic layers - #1886
rubenthoms wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Trace positioning, canvas pixel alignment, and missing-value handling can produce incorrect readouts.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds bilinear interpolation to seismic readouts for smoother values and RGB sampling.
Changes:
- Interpolates RGB canvas pixels.
- Interpolates seismic values across traces and depth samples.
File summaries
| File | Description |
|---|---|
frontend/src/modules/_shared/components/EsvIntersection/utils/readoutItemUtils.tsx |
Adds bilinear seismic readout calculations. |
Review details
Suppressed comments (2)
frontend/src/modules/_shared/components/EsvIntersection/utils/readoutItemUtils.tsx:482
- Fence data uses
NaNas its fill value, and the rendered image converts those entries to0before interpolation. Reading the raw array here means any missing neighbor makes the entire resultNaN—even when its interpolation weight is zero—so valid sample centers can display no numeric value. Apply the sameNaN-to-zero normalization used bycreateSeismicSliceImageDatapointsArrayFromFenceTracesArray.
const valueAt = (traceNum: number, sampleNum: number) =>
seismicData.fenceTracesArray[traceNum * seismicData.numSamplesPerTrace + sampleNum];
frontend/src/modules/_shared/components/EsvIntersection/utils/readoutItemUtils.tsx:466
- This assumes traces are uniformly spaced at cell centers, but each trace is located at its entry in
trajectoryFenceProjection, which is built from actual (potentially unequal) section lengths. The renderer likewise chooses the enclosing trajectory segment and interpolates by its local ratio (SeismicLayer.ts:261-279). As written, a cursor exactly on a trace can return a blend of adjacent traces. Locate the segment intrajectoryFenceProjectionand derivetraceFracfrom that segment's two x coordinates instead.
const sampleGridPos = (y - seismicData.minFenceDepth) / rowHeight;
const traceGridPos = (x - seismicInfo.minX) / columnWidth;
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Horizontal interpolation incorrectly assumes uniformly spaced traces instead of using actual trajectory coordinates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Missing seismic samples can produce NaN readouts inconsistent with the rendered layer.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
No description provided.