-
Notifications
You must be signed in to change notification settings - Fork 0
/
Project.py
27 lines (23 loc) · 902 Bytes
/
Project.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Use attrib -h in cmd on a file to reveal and delete all hidden files in data input"""
import os
class Directory:
imageGroups = []
img_input = []
def __init__(self, directory_name):
self.directory_name = directory_name
#creating the image sets to be processed
def openDirectory(self):
if os.path.isdir(self.directory_name) == True:
for x in os.listdir(self.directory_name):
path = "Data"
self.imageGroups.append(os.path.join(path, x))
else:
return "Input is not a valid drectory"
for x in self.imageGroups:
imgs = []
if os.path.isdir(x) == True:
for y in os.listdir(x):
if y.endswith(".TIFF"):
imgs.append(os.path.join(x, y))
self.img_input.append(imgs)
return self.img_input