Function sdf::convert::discretize [] [src]

pub fn discretize(record: &Record, file_info: &FileInfo) -> Result<Vec<Point>>

Turns a single sdf record into zero or more Points.

At this point, we assume that the timestamps are absolute. TODO make this smarter to handle the case when the user has called File::set_sosbl_mode(SosblMode::Relative).

Panics

Panics if there are zero or more than one reference blocks in the record.

Examples

use sdf::convert::discretize;
use sdf::file::File;
let mut file = File::open("data/110630_174316.sdf").unwrap();
let ref file_info = file.info().unwrap();
file.reindex().unwrap();
let ref record = file.read().unwrap();
let points = discretize(record, file_info).unwrap();