79bfe7270e
Signed-off-by: Neerka <kuba.markil0220@gmail.com>
120 lines
2.5 KiB
Python
120 lines
2.5 KiB
Python
from random import choice as rd
|
|
|
|
import numpy as np
|
|
|
|
from classes.trashFunctions import generatePicList
|
|
|
|
|
|
class Trash:
|
|
def __init__(self):
|
|
self.tree_type = 0
|
|
self.ttype = "Trash"
|
|
self.real_type = "Trash"
|
|
self.scan_id = 0
|
|
self.waga = 1
|
|
self.image = None
|
|
|
|
def getRealtype(self):
|
|
return self.real_type
|
|
|
|
def getScanid(self):
|
|
return self.scan_id
|
|
|
|
def getTreetype(self):
|
|
return self.tree_type
|
|
|
|
def setTreetype(self, treetype):
|
|
self.tree_type = id
|
|
return self
|
|
|
|
def getTtype(self):
|
|
return self.ttype
|
|
|
|
def setTtype(self, ttype):
|
|
self.ttype = ttype
|
|
return self
|
|
|
|
def getWaga(self):
|
|
return self.waga
|
|
|
|
def setWaga(self, waga):
|
|
self.waga = waga
|
|
return self
|
|
|
|
def getImage(self):
|
|
return self.image
|
|
|
|
def setImage(self, image):
|
|
self.image = image
|
|
return self
|
|
|
|
|
|
class Papier(Trash):
|
|
lista_obrazow = generatePicList("paper")
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.tree_type = 1
|
|
self.ttype = "Papier"
|
|
self.real_type = "Papier"
|
|
self.scan_id = 0
|
|
self.waga = 2
|
|
self.image = None
|
|
self.setImage(rd(self.lista_obrazow))
|
|
|
|
|
|
class MetalPlastik(Trash):
|
|
lista_obrazow = generatePicList("plastic")
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.tree_type = 2
|
|
self.ttype = "MetalPlastik"
|
|
self.real_type = "MetalPlastik"
|
|
self.scan_id = 4
|
|
self.waga = 3
|
|
self.image = None
|
|
self.setImage(rd(self.lista_obrazow))
|
|
|
|
|
|
class Mixed(Trash):
|
|
lista_obrazow = generatePicList("mixed")
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.tree_type = 4
|
|
self.ttype = "Mixed"
|
|
self.real_type = "Mixed"
|
|
self.scan_id = 2
|
|
self.waga = 1
|
|
self.image = None
|
|
self.setImage(rd(self.lista_obrazow))
|
|
|
|
|
|
class Bio(Trash):
|
|
lista_obrazow = generatePicList("bio")
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.tree_type = 0
|
|
self.ttype = "Bio"
|
|
self.real_type = "Bio"
|
|
self.scan_id = 1
|
|
self.waga = 2
|
|
self.image = None
|
|
self.setImage(rd(self.lista_obrazow))
|
|
|
|
|
|
class Szklo(Trash):
|
|
lista_obrazow = generatePicList("glass")
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.tree_type = 3
|
|
self.ttype = "Szklo"
|
|
self.real_type = "Szklo"
|
|
self.scan_id = 3
|
|
self.waga = 5
|
|
self.image = None
|
|
self.setImage(rd(self.lista_obrazow))
|