Skip to content

Improve dialog show spots and divisions#87

Merged
stefanhahmann merged 5 commits into
masterfrom
improve-spots-and-divisions
May 6, 2025
Merged

Improve dialog show spots and divisions#87
stefanhahmann merged 5 commits into
masterfrom
improve-spots-and-divisions

Conversation

@stefanhahmann
Copy link
Copy Markdown
Collaborator

@stefanhahmann stefanhahmann commented May 6, 2025

This PR adds the following features to the dialog that shows spot counts and division counts per timepoint:

  • Color choosing
    • Spots
    • Divisions
  • Show / Not show
    • Spot Counts
    • Spots Average
    • Divisions Counts
    • Divisions Average
  • Set Sliding Window Size
    • Spots
    • Divisions

All settings can now be made directly in the dialog.
All settings are persisted as user preference.

The new dialog looks like this:

grafik

@stefanhahmann stefanhahmann self-assigned this May 6, 2025
@stefanhahmann stefanhahmann requested a review from Copilot May 6, 2025 16:16
Copy link
Copy Markdown
Contributor

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 PR enhances the dialog for visualizing spot and division counts over time by introducing new UI controls for color selection, visibility toggling, and adjusting the sliding average window size, with all preferences persisted to user settings.

  • Refactored SpotAndDivisionCountChart to integrate new controls and persist settings.
  • Removed the obsolete ShowSpotAndDivisionCountsOverTimeCommand and updated related plugin integrations.
  • Updated GitHub Actions workflows to use the latest Java setup action.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
SpotAndDivisionCountChart.java Added new UI controls and persistent settings for color, visibility, and sliding window sizes; refactored chart creation and update methods.
ShowSpotAndDivisionCountsOverTimeCommand.java Deleted obsolete command class in favor of the new chart.show() integration.
TomancakPlugins.java Updated integration to use SpotAndDivisionCountChart.show() and injected PrefService dependency.
build-pr.yml, build-main.yml Upgraded Java setup to actions/setup-java@v4.
Comments suppressed due to low confidence (1)

src/main/java/org/mastodon/mamut/tomancak/divisioncount/SpotAndDivisionCountChart.java:312

  • [nitpick] Consider updating the properties of the existing renderer instead of instantiating a new one each time in updateChartColors to preserve any internal state and improve performance.
XYLineAndShapeRenderer spotCountRenderer = createRenderer(spotCountColor, new Rectangle2D.Double( -2, -2, 4, 4 ) );

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stefanhahmann stefanhahmann force-pushed the improve-spots-and-divisions branch from 8f9fc54 to 5492899 Compare May 6, 2025 16:25
@stefanhahmann stefanhahmann merged commit 6b1a5d7 into master May 6, 2025
@stefanhahmann stefanhahmann deleted the improve-spots-and-divisions branch May 6, 2025 16:32
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.

2 participants