Skip to content

Commit

Permalink
create a template for Blob and BeadFinder classes in beadfinder.py
Browse files Browse the repository at this point in the history
accourding to the Atomic-Nature.pdf file
  • Loading branch information
saadati944 committed Jan 12, 2021
1 parent 40d4a4d commit 79a90af
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions beadfinder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import sys
from stdlibrary import picture, color


class Blob:
pixels = []

def add(self, x, y):
pass

def mass(self):
pass

def distanceTo(self, c):
pass

def __str__(self):
return str(len(self.pixels))


class BeadFinder:
def __init__(self, pic, tau):
pass

def getBeads(self, min_pixels):
pass


def main():
min_pixels = int(sys.argv[1])
tau = float(sys.argv[2])
input_file = sys.argv[3]

bf = BeadFinder(input_file, tau)

for blb in bf.getBeads(min_pixels):
print(blb)

0 comments on commit 79a90af

Please sign in to comment.