10 Flow read_flow(const char *filename)
12 FILE *flowfp = fopen(filename, "rb");
13 uint32_t hdr, width, height;
14 fread(&hdr, sizeof(hdr), 1, flowfp);
15 fread(&width, sizeof(width), 1, flowfp);
16 fread(&height, sizeof(height), 1, flowfp);
18 unique_ptr<Vec2[]> flow(new Vec2[width * height]);
19 fread(flow.get(), width * height * sizeof(Vec2), 1, flowfp);
24 ret.flow = move(flow);