ANP-Granular / ParticleTracking

Library and GUI for tracking (rod-like) particles on camera images in 2D and 3D
https://particletracking.readthedocs.io/en/latest/
GNU General Public License v3.0
2 stars 2 forks source link

Rod Tracker - Change select mode of Load Images dialogue #88

Closed merrygoat closed 3 months ago

merrygoat commented 4 months ago

When using the "Load Images" button in Rod Tracker, the open file dialogue opens in file select mode. This is confusing because it only lets me select one file but then on loading it loads the whole folder of files.

Suggestion: Either allow selection of multiple files and load only the selected files or allow selection of a folder and open all images in that folder.

Since you use QFileDialog, I think either of these options could be achieved using the setFileMode() function of the QFileDialog widget.

a-niem commented 3 months ago

The mode has been adjusted as requested. Now a directory must be selected, and the first file contained in it will be displayed immediately. When moving into a directory in the picker dialog the relevant files contained in it are displayed. This behavior has been adopted to the position data selection, too.

This however, leads to situation where users cannot confirm the selection when (accidentally) selecting one of the files in the folder that they would like to open.

Unfortunately, the in my opinion optimal solution of displaying the contained files but having them non-interactive, was not possible to achieve.

@dmitrypuzyrev and @merrygoat It would be great, if you could test out this new behavior in the develop branch and let me know about your opinions on it.

merrygoat commented 3 months ago

Initially I did try to click on an individual image and it does nothing and then when you look more closely, the select box is greyed out, the dialogue title is "Open a Folder" and the file type selector says "directory" in it so I think this behaviour is quite clear.

a-niem commented 3 months ago

Ok, then we keep it this way.