Skip to content

Commit f391f32

Browse files
committed
Fix template matching folder
The method FormatService.getFormat(path) was not working anymore, replaced path with FileLocation(path)
1 parent 32445ad commit f391f32

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Fiji.app/scripts/Plugins/Multi-Template-Matching/Template_Matching_Folder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from ij.gui import Roi
2727
from os import listdir
2828
from os.path import join, isfile, isdir
29+
from org.scijava.io.location import FileLocation
30+
2931
#import time
3032

3133
## Home-Made module
@@ -166,7 +168,7 @@
166168

167169
if isfile(FullPathTem):
168170
try:
169-
fs.getFormat(FullPathTem) # check that it is an image file
171+
fs.getFormat(FileLocation(FullPathTem)) # check that it is an image file
170172
ListPathTemplate.append(FullPathTem)
171173
except:
172174
pass
@@ -192,7 +194,7 @@
192194

193195
if isfile(FullPathIm):
194196
try:
195-
fs.getFormat(FullPathIm) # check that it is an image file
197+
fs.getFormat(FileLocation(FullPathIm)) # check that it is an image file
196198
ListPathImage.append(FullPathIm)
197199
except:
198200
pass

0 commit comments

Comments
 (0)