Specify min dependency and minor cleanups.

This commit is contained in:
Kevin Baensch 2021-03-10 22:19:06 +01:00
parent 4f9af8446c
commit ca803a53c9
Signed by: derped
GPG Key ID: C0F1D326C7626543
3 changed files with 2 additions and 7 deletions

View File

@ -122,7 +122,6 @@ def main():
[f.opqueue.__init__([normalize, to8bit, rollingball, wat]) for f in files]
[f.apply(dslice(f.opqueue,None,-1)) for f in files]
# [(f.apply(f.opqueue), f.save(True, f.opqueue)) for f in files]
window.init(files)
window.reset()
return True

View File

@ -53,7 +53,7 @@ class FILE:
self.meta = pd.DataFrame(None if self.data[1]["data"][1:] == [] else self.data[1]["data"][1:], columns=self.data[1]["data"][0])
self.meta.insert(loc=0, column="Label", value="".join([self.fname, self.fext]))
spath = self.path.split(path.sep)
if len(spath) > 2 and spath[-1] in ["BFP", "YFP"] and spath[-2][:-1].isdigit():
if len(spath) > 2 and spath[-2][:-1].isdigit():
hour, culture = self.path.split(path.sep)[-2:]
hour = int(hour[:-1])
else:
@ -82,11 +82,7 @@ class FILE:
if self.outlines is not None:
imwrite(path.join(DIROUT, self.path, f"{self.fname}.outlines.jpg"), self.outlines)
if self.meta is not None:
print(path.join(DIROUT, self.path, f"{self.fname}.csv"))
self.meta.to_csv(path.join(DIROUT, self.path, f"{self.fname}.csv"), index=False)
# [l.insert(1, self.getName(False, {})) for l in self.meta["data"][1:]]
# with open(path.join(DIROUT, self.path, f"{self.fname}.csv"), "w") as f:
# [f.write(",".join([str(e) for e in l]) + "\n") for l in self.meta["data"]]
else:
if not path.exists(path.join(DIRCACHE, self.path)):
makedirs(path.join(DIRCACHE, self.path))

View File

@ -1,5 +1,5 @@
numpy
opencv-python == 4.3.0
pythreshold
scikit-image
scikit-image >= 0.18.1
scipy