Skip to content
Snippets Groups Projects
Commit 2274b531 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Don't need to do poly_to_mask() anymore

parent 8ef7a589
Branches
Tags
1 merge request!353DFV and multiple fixes
......@@ -41,7 +41,7 @@ class File(BioFile):
image = super(File, self).load(*args, **kwargs)
image = numpy.rot90(image, 3)
if not self.has_roi():
if not self.__f.has_roi():
return image
else:
......@@ -50,9 +50,8 @@ class File(BioFile):
# calculates the 90 degrees anti-clockwise rotated RoI points
w, h = image.shape
roi = [(x,h-y) for (y,x) in roi]
mask = poly_to_mask(image.shape, roi)
return AnnotatedArray(image, metadata=dict(mask=mask, roi=roi))
return AnnotatedArray(image, metadata=dict(roi=roi))
class Database(BioDatabase):
......
......@@ -32,8 +32,7 @@ class File(BioFile):
image = super(File, self).load(*args, **kwargs)
roi = self.__f.roi()
mask = poly_to_mask(image.shape, roi)
return AnnotatedArray(image, metadata=dict(mask=mask, roi=roi))
return AnnotatedArray(image, metadata=dict(roi=roi))
class Database(BioDatabase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment