jnowak90 / GraVisGUI

A network-based shape descriptor
GNU General Public License v3.0
8 stars 5 forks source link

GraViz detecting images twice #3

Open Cryaaa opened 1 year ago

Cryaaa commented 1 year ago

Hello, I want to use graviz to analyse some 2D segmented image data (.tif - binary) but whenever I select a folder of files it detects double the amount of images as are in the folder. When I look at the saved labels it just runs through all images twice. I double checked the folder contents and even created some test folders where I only put 1 .tif image but it detects two when I open the folder.

Cryaaa commented 1 year ago

Upon further inspection it seems that line 209 below is causing the error:

https://github.com/jnowak90/GraVisGUI/blob/89a8f0945c27596cde13f0aad81fe17ed9d9b6a2/SourceCode/ShapeGUI.py#L201-L210

Testing the glob function locally it seems that the upper and lowercase does not matter for glob, so it's loading the tif files twice because your are looking for .tif and .TIF files. I guess the same problem would occur with the ROI files. I'm happy to make a quick PR to fix the issue.