Repository navigation
Add PeakError to result - #8
Merged
Merged
Conversation
Mean error alone hides localized artifacts; specify peak error before implementing it, including that magma-mapped output reports the same peak as grayscale output since the colormapped map cannot be scanned for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mean error dilutes small but severe artifacts, so expose the maximum per-pixel error as well. FLIP's pointer API reports only the mean, and once the magma colormap is applied the error values cannot be recovered, so the native wrapper computes the peak from the grayscale map itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the usage samples and the P/Invoke signatures in sync with the added peak error output so readers do not copy a stale flip_evaluate signature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The doc referenced a removed flip_parameters_init, platform-specific library names and a manual Plugins layout that the NuGet-based distribution never used, and full copies of the sources had already diverged; link to the sources instead so the doc cannot drift again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wrapper mirrors FLIP's pointer-based evaluate(), which syncs device data to the host before scanning and copying it; without the same guards a CUDA build would read stale host memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nowsprinting
marked this pull request as draft
October 14, 2026 06:07
nowsprinting
marked this pull request as ready for review
October 14, 2026 06:18
There was a problem hiding this comment.
🟢 Approval recommended
The managed and native API changes are consistent and adequately tested.
0 open findings
What changed in this PR
Adds maximum per-pixel FLIP error reporting across the native and managed APIs.
Changes:
- Computes peak error before optional Magma mapping.
- Exposes
FlipResult.PeakErrorthrough P/Invoke. - Adds tests and updates usage documentation.
| File | Description |
|---|---|
README.md |
Documents peak error usage. |
FlipBinding.CSharp/FlipResult.cs |
Adds PeakError. |
FlipBinding.CSharp/FlipNative.cs |
Updates native signature. |
FlipBinding.CSharp/Flip.cs |
Returns native peak error. |
FlipBinding.CSharp.Tests/FlipTest.cs |
Tests peak evaluation behavior. |
FlipBinding.CSharp.Tests/FlipResultTest.cs |
Updates constructor tests. |
flip-native/flip_capi.h |
Extends the C API. |
flip-native/flip_capi.cpp |
Computes peak from grayscale output. |
Docs/sample_ja.md |
Adds peak usage examples. |
Docs/pinvoke_ja.md |
Synchronizes P/Invoke documentation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sakumanaoki
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
FlipResult.PeakError(maximum per-pixel FLIP error)flip-nativecomputes it from the grayscale map before colormappingBreaking changes
FlipResultconstructor takes a newpeakErrorparameterflip_evaluateinflip-nativetakes a newpeak_errorparameter; the managed library and native libraries must be updated together🤖 Generated with Claude Code