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