This document shows how to use the ostd format implementation. See SPEC.md for controlling information on how to create or parse a file.
Most people will want to create a osteoid.Skeleton obect by reading or writing an ostd file just like they would with an SWC.
import osteoid
skeleton = osteoid.load("example.ostd")
skeleton.save("example.ostd")However, there is information in OSTD headers that could be parsed without reading in the entire file.
from osteoid.formats.ostd import OstdSkeleton
skeleton = OstdSkeleton.load("example.ostd", allow_mmap=True)
skeleton.cable_length
skeleton.num_components
skeleton.num_vertices
skeleton.num_edgesYou can read and convert .ostd files with the ostd command line tool.
ostd info example.ostd # prints header and some attribute infoConvert between formats:
ostd convert example.swc example.ostd
ostd convert example.ostd example.swcYou can even view a skeleton:
ostd view example.swc
ostd view example.osdt