Skip to content

Some more GUI improvements - #544

Merged
twagner9 merged 12 commits into
timothygrant80:masterfrom
twagner9:heat-map-to-png
May 19, 2026
Merged

Some more GUI improvements#544
twagner9 merged 12 commits into
timothygrant80:masterfrom
twagner9:heat-map-to-png

Conversation

@twagner9

Copy link
Copy Markdown
Collaborator

Description

This update tackles a few different UX improvements:

Refinement Results

Previously the only heat map that could be saved as a PNG was the highly detailed one that showed every point plotted, as opposed to the binned heat map, which can sometimes be useful to save as well.

Display Program

This included several UX updates:

  1. Return to having attempts at opening cisTEM_display with arguments open in an existing display instance instead of opening a separate display by establishing the first instance as a server and searching for the server socket in /tmp. I coded this up from scratch but it was present in the Tigris display, which also did this.
  2. Images displayed in cisTEM_display can now be saved directly as a PNG, rather than having to take a screen-cap. Along with this, there is a second saving option that will save the image(s) on a white background with a color gradient legend that displays the approximate pixel values of the grayscale coloration.
  3. There is now a brief user manual under the Help menu that will explain some of the cisTEM_display controls that aren't really listed anywhere, such as use of arrow keys for scrolling images/tabs, and the effects of the mouse buttons when in certain modes. Many people around the lab were unaware of some of the nicer features with this so it seems likely any other users probably were not aware either.

Fixes # (issue)

I have rebased my feature branch to be current with the master branch using to minimize conflicts and headaches

  • yes
  • no

Which compilers were tested

  • g++
  • icpc
  • clang
  • other (please specify)

These changes are isolated to the

  • gui
  • core library
  • gpu core library
  • program it modifies

How has the functionality been tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Tested manually from GUI
  • Tested manually from CLI
  • Passed console tests
  • Passed samples functional testing
  • other (please specify)

Checklist:

  • I have not changed anything that did not need to be changed
  • I have performed a self-review of my own code
  • I have commented my code, (w.r.t. why), particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation {Ok to pass for now}
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

bHimes
bHimes previously approved these changes Sep 13, 2025

@bHimes bHimes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Afaik this looks good.

@twagner9

Copy link
Copy Markdown
Collaborator Author

@bHimes
I added just one final change requested by @timothygrant80 to allow users to pass a switch (-n) that will let users open a new instance of cisTEM_display with MRC file arguments. It just uses the built-in wxCmdLineParser to check for the switch and now loads the filenames into a member array to stick to better DRY principles. Functionality otherwise the same.

@twagner9
twagner9 force-pushed the heat-map-to-png branch 2 times, most recently from c8cac2e to 7a62fc1 Compare October 16, 2025 18:27
-Makes the first display instance a server with a listening socket in /tmp. Subsequent attempts to open a display (with arguments) will instead be opened in the existing instance of the display. It is possible to still have multiple displays by opening a new instance of the program without any arguments.
It can sometimes be useful for creating figures to used the binned form of the angular distribution plot. This adds a button to give that option.
-Only works for the currently displayed images that are rendered in the bitmap; slices or images that are further in the stack will not be saved, and images that are zoomed in single image mode will not be displayed either.

-Image selection circles and coordinate selection circles will not be present as these are not actually rendered directly onto the bitmap. It may be useful to change this in the future, so users can save selection distances and image selections as a way to point more specifically to certain images.
Original bitmap saving to PNG would save the full client panel size, not just the part of the bitmap that contains the relevant info. This updates the logic so that only the relevant porition of the image is saved.
The cisTEM display program has some keyboard and mouse controls that are not immediately clear upon opening the display. This adds an option to the help menu that will open up the manual and explain some of these controls.

In the future, this may also be a good place to add additional information on how a user might go about utilizing the display.
-DisplayFrame has a new option in the File menu that allows users to save their displayed image(s) as a PNG with a legend that displays a grayscale gradient displaying intervals of pixel values.

-DisplayPanel now properly stores the number of images in the current view; before it would default to the maximum number of images that could fit on the panel instead of the number actually displayed.
cisTEM_display.cpp:
-Now uses wxCmdLineParser to check for a switch, -n, which will allow users to open a new instance of cisTEM_display WITH arguments, instead of forcing users to open in the current display server. Requested by @timothygrant80.

clang-format for MyRefinementResultsPanel.h
-DisplayPanel.cpp: Previously, the short_image_filename member of the DisplayNotebookPanel class was not being updated to store the wanted tab title, and would leave only an '*' character. This causes the assignment to happen during the OpenFile function instead of outside of it, so that the tab title will always be properly displayed. Also unifies the display when opening from CLI or the file opening dialog so that only the file name is displayed rather than the absolute path. The absolute path can still be displayed by hovering to get a tooltip.

-cisTEM_display.cpp: gets the wanted tab title so that it can be passed to DisplayPanel::OpenFile and properly store the file name.
@timothygrant80
timothygrant80 self-requested a review May 19, 2026 16:09

@timothygrant80 timothygrant80 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good.

@twagner9
twagner9 merged commit 4066157 into timothygrant80:master May 19, 2026
15 of 16 checks passed
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.

3 participants