Commit a7b2f7f1 authored by André Anjos's avatar André Anjos 💬
Browse files

Catch-up with changes to verafinger

parent 470b12f3
Pipeline #18372 passed with stages
in 60 minutes and 15 seconds
...@@ -36,10 +36,8 @@ class File(BioFile): ...@@ -36,10 +36,8 @@ class File(BioFile):
basedir = args[0] if args else kwargs['directory'] basedir = args[0] if args else kwargs['directory']
annotdir = os.path.join(basedir, 'annotations', 'roi') annotdir = os.path.join(basedir, 'annotations', 'roi')
if os.path.exists(annotdir): if os.path.exists(annotdir):
print('loading annotations')
roi = self.__f.roi(args[0]) roi = self.__f.roi(args[0])
return AnnotatedArray(image, metadata=dict(roi=roi)) return AnnotatedArray(image, metadata=dict(roi=roi))
print('NOT loading annotations')
return image return image
...@@ -72,6 +70,8 @@ class Database(BioDatabase): ...@@ -72,6 +70,8 @@ class Database(BioDatabase):
groups = self.convert_names_to_lowlevel(groups, groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names) self.low_level_group_names, self.high_level_group_names)
if protocol.endswith('-va') or protocol.endswith('-VA'):
protocol = protocol[:-3]
return self._db.model_ids(groups=groups, protocol=protocol) return self._db.model_ids(groups=groups, protocol=protocol)
...@@ -81,15 +81,12 @@ class Database(BioDatabase): ...@@ -81,15 +81,12 @@ class Database(BioDatabase):
groups = self.convert_names_to_lowlevel(groups, groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names) self.low_level_group_names, self.high_level_group_names)
if (protocol.endswith('-va') or protocol.endswith('-VA')) and \ if protocol.endswith('-va') or protocol.endswith('-VA'):
purposes=='probe': #the user actually means 'attack' protocol = protocol[:-3]
retval = self._db.objects(groups=groups, protocol=protocol[:-3], if purposes=='probe': purposes='attack'
purposes='attack', model_ids=model_ids,
**kwargs) retval = self._db.objects(groups=groups, protocol=protocol,
else: purposes=purposes, model_ids=model_ids, **kwargs)
retval = self._db.objects(groups=groups, protocol=protocol,
purposes=purposes, model_ids=model_ids,
**kwargs)
return [File(f) for f in retval] return [File(f) for f in retval]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment