Skip to content

Add histogram view transforms with ROI remap#118

Merged
KedoKudo merged 3 commits intomainfrom
claude/main
Feb 5, 2026
Merged

Add histogram view transforms with ROI remap#118
KedoKudo merged 3 commits intomainfrom
claude/main

Conversation

@KedoKudo
Copy link
Contributor

@KedoKudo KedoKudo commented Feb 5, 2026

Summary

  • add histogram view transforms with rotate/flip controls and status indication
  • remap ROI shapes and overlays to keep selections aligned with transformed views
  • update ROI spectra and cursor mapping to respect display transforms

Testing

  • pixi run lint

Closes #116

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements histogram view transformations (rotate 90° CW/CCW, flip horizontal/vertical) with comprehensive ROI remapping to keep selections aligned with the transformed views. The implementation follows "Option A" from the linked issue #116, transforming ROI coordinates to stay visually attached to the same data regions.

Changes:

  • Added ViewTransform state structure with rotation (0°/90°/180°/270°) and flip controls
  • Implemented coordinate transformation functions for mapping between data and display space
  • Updated ROI spectrum computation and cursor coordinate handling to respect transforms
  • Added UI controls with keyboard shortcuts (R, Shift+R, H, V) and status indicators

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rustpix-gui/src/state/ui.rs Adds ViewTransform and Rotation types with coordinate transformation methods
rustpix-gui/src/state/mod.rs Exports ViewTransform type
rustpix-gui/src/viewer/texture.rs Renames function and adds transform parameter to apply coordinate mapping during image generation
rustpix-gui/src/viewer/roi.rs Makes touch() method pub(crate) for external revision updates
rustpix-gui/src/viewer/mod.rs Updates public API export
rustpix-gui/src/ui/main_view.rs Adds transform control buttons, keyboard shortcuts, and applies transforms to hot pixel overlay and cursor mapping
rustpix-gui/src/ui/control_panel.rs Updates status banner to show active transform state
rustpix-gui/src/app.rs Implements ROI remapping logic, updates spectrum computation with transform awareness, and manages transform-sensitive cache invalidation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KedoKudo KedoKudo merged commit 91e11df into main Feb 5, 2026
9 checks passed
@KedoKudo KedoKudo deleted the claude/main branch February 5, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI: Add rotation and flip controls for histogram view

1 participant