← 返回首页
add imgui file dialog example by FlynnOConnell · Pull Request #950 · fastplotlib/fastplotlib · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

add imgui file dialog example#950

Open
FlynnOConnell wants to merge 5 commits into
mainfrom
examples-imgui-filedialog
Open

add imgui file dialog example#950
FlynnOConnell wants to merge 5 commits into
mainfrom
examples-imgui-filedialog

Conversation

FlynnOConnell commented Nov 23, 2025
edited
Loading

Copy link
Copy Markdown
Collaborator

WIP, Relies on #868, might be simplified by #849.

This example could save another synthetic dataset to png or mp4 to showcase loading different sizes / # of dims.

Could also instead copy the imgui_basic example for the UI and put the open file / open folder in a menu:

Vipitis commented Nov 26, 2025

Copy link
Copy Markdown

That is a really useful example. I looked at it briefly and might expand it with sequence thumbnails and an asnyc/threaded data loader as I have a lot of different sequences in a dataset to evaluate but they are on a slowish network drive.

Copy link
Copy Markdown
Member

If you can make a simple example that just uses imageio to load existing image files and just displays an ImageGraphic I think that would be simpler and I can merge it. I'm holding off on any PRs for ImageWidget until #951

That is a really useful example. I looked at it briefly and might expand it with sequence thumbnails and an asnyc/threaded data loader as I have a lot of different sequences in a dataset to evaluate but they are on a slowish network drive.

Sequences, as in image sequences? Sounds like making a numpy-like interface for lazy loading is the way to go, we do it a lot in another project: https://github.com/apasarkar/masknmf-toolbox/blob/main/masknmf/arrays/array_interfaces.py

Comment thread examples/guis/imgui_file_dialog.py Outdated Show resolved Hide resolved

github-actions Bot commented Nov 29, 2025
edited
Loading

Copy link
Copy Markdown

📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/examples-imgui-filedialog

Comment thread examples/guis/imgui_file_dialog.py Outdated
"""Load an image file and update the graphic."""
try:
img_data = iio.imread(filepath)
self._image_graphic.data = img_data

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Need to create a new image graphic if the buffer shape doesn't match.

Vipitis commented Dec 10, 2025

Copy link
Copy Markdown

Sequences, as in image sequences? Sounds like making a numpy-like interface for lazy loading is the way to go, we do it a lot in another project: https://github.com/apasarkar/masknmf-toolbox/blob/main/masknmf/arrays/array_interfaces.py

I got an easy solution by making the numpy array of the correct size as zeros (maybe even np.empty could work) and then I just write the pixel data into that using threading.Thread while the GUI already shows. Here the loading order is predetermined, so random jumps won't "lazy load". Will still look into the thumbnails when I have more time.

self._image_graphic.data = img_data
else:
# shape mismatch: remove old graphic and create a new one
subplot = self._image_graphic._plot_area

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

EdgeWindow has a figure instance so you can use that to get the subplot. Graphic._plot_area isn't part of the public API

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.