Skip to content

Enhance Time Stamper with non-blocking interactive preview, custom formatting, and alignment controls#3

Open
hiro-shikata wants to merge 38 commits into
fiji:masterfrom
hiro-shikata:master
Open

Enhance Time Stamper with non-blocking interactive preview, custom formatting, and alignment controls#3
hiro-shikata wants to merge 38 commits into
fiji:masterfrom
hiro-shikata:master

Conversation

@hiro-shikata

Copy link
Copy Markdown

Thank you for your contribution to the Time Stamper plugin. I am a heavy user of this plugin and recently improved it to meet my needs using AI-assisted coding. I believe these enhancements will be useful for everyone. I have forked the repository and updated the README with further details. I would appreciate it if you could take a look.

Description

This pull request introduces significant usability improvements and new features to the Time_Stamper plugin, transforming it into an interactive and customizable tool.

Key Changes

  1. Non-blocking Interactive Preview & Drag-to-Position
    • Replaced GenericDialog with NonBlockingGenericDialog and implemented DialogListener to enable real-time updates of the timestamp preview.
    • Implemented RoiListener to automatically synchronize the text ROI's coordinates with the dialog's X Location and Y Location input fields as the user drags it on the image.
  2. Custom Format & Unit Support
    • Added a customizable format field supporting placeholders such as ${dd}/${d} (Days), ${hh}/${h} (Hours), ${mm}/${m} (Minutes), and ${ss}/${s} (Seconds) to easily format elapsed time (e.g. converting 26 hours to 1d02h).
    • Added support for specifying input time units (Seconds, Minutes, Hours) for correct day/time conversion calculations.
  3. Text Alignment Controls
    • Added an alignment option ("Left", "Center", "Right") to easily format text positions relative to the coordinates.
  4. "Create New Window" Option
    • Added an option to draw timestamps on a duplicated image window, preserving the original raw stack.

Verification

  • Built successfully using Maven (mvn clean compile).
  • Verified interactively in Fiji/ImageJ:
    • Dragging the preview ROI correctly updates coordinates in the dialog.
    • Parameter changes (font size, style, color, format) update the preview ROI instantly.
    • Verified custom format behavior, text alignment, and the "Create New Window" option.

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.

1 participant