Skip to content

Instantly share code, notes, and snippets.

View bbarad's full-sized avatar

Benjamin Barad bbarad

View GitHub Profile
@bbarad
bbarad / stl2sff.py
Created February 8, 2023 04:24
Convert a bunch of individual STL files to a large mesh collection sff file.
## Convert all mitochondria STL files in current directory to SFF/HFF files
## Usage: python stl2sff.py FOLDERNAME
## Assumes there are multiple mitochondria per tomogram and up to one ER per tomogram.
## Performs both per-segment and global annotations based on assumption of MitoGFP MEF cells treated with thapsigargin (sometimes)
## Outputs HFF format sff files.
## Author: Benjamin Barad <[email protected]> with guidance from Paul Korir
import os
import sys
import glob