Skip to content

Instantly share code, notes, and snippets.

/experiment.py Secret

Created February 23, 2017 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/196ab1858ad20a5ac2f33cf494eeaaf2 to your computer and use it in GitHub Desktop.
Save anonymous/196ab1858ad20a5ac2f33cf494eeaaf2 to your computer and use it in GitHub Desktop.
# Run on lots of possibilities
morphologicals = [2, 3, 4, 5]
smooths = [2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5]
results = []
for m, s in itertools.product(morphologicals, smooths):
doc.SubmitCommand(ThinObjectSmoother(m, s, m - 1))
volume = get_mask_volume()
results.append([m, s, volume])
doc.Undo()
doc.GenerateFastPreview()
with open(os.path.expanduser(r"~\Desktop\FilterDataSmall.csv"), 'wb') as csv_file:
writer = csv.writer(csv_file)
writer.writerow(["Morphological", "Smooth", "Volume"])
writer.writerows(results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment