Skip to content

Issue: Legend Placement Occurs on Cropped ROI Instead of Original Image #32

@Huq2090

Description

@Huq2090

Description
Currently, NanoPSD overlays legends (e.g., morphology labels, contour annotations) on the cropped region of interest (ROI) rather than the original full-resolution image. This leads to inconsistent visualization and reduced interpretability, especially when comparing outputs across different processing stages.


Observed Behavior

  • Image is cropped for processing (e.g., nanoparticle detection region)
  • Legends and annotations are rendered directly on this cropped image
  • Final saved output contains annotations only within the cropped frame

Expected Behavior

  • All legends and annotations should be placed on the original full image
  • The detected ROI results should be mapped back to the original coordinate system
  • Final output should preserve full image context with correctly positioned overlays

Why This Matters

  • Reduces publication-quality visualization
  • Inconsistent with typical SEM/TEM analysis workflows

Proposed Fix / Direction

  • Render all annotations (contours, ellipses, legends, labels) on the original image

Steps to Reproduce

  1. Run NanoPSD on any SEM/TEM image with cropping enabled
  2. Inspect output image
  3. Observe legends confined to cropped region

Impact
Medium–High (affects visualization quality and usability for publication)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions