forked from namelessjon/tip_trace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtip_trace_binary.h
47 lines (41 loc) · 1.32 KB
/
tip_trace_binary.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* tip_trace_binary.h
* Jonathan D. Stott <[email protected]>
*
* Functions used as part of the tip trace binary (as compared to the library)
*/
#ifndef TIP_TRACE_BINARY_H
#define TIP_TRACE_BINARY_H
#include <stdio.h>
#include "utils/string_list.h"
typedef enum file_type {
BINARY_FLOAT,
BINARY_DOUBLE,
TEXT
} file_type_t;
void process_file_list(int x, int y, float dt, float isoline, string_list_t *list,
file_type_t file_type, FILE *output);
// given the dimensions of the tissue and a list of filenames, process each one
// in turn, printing the tip trace to the give output file.
//
// arguments:
// x: x dimension of the sheet
// y: y dimension of the sheet
// dt: interval between files
// isoline: isoline to search on
// list: list of filenames to process
// file_type: Type of files in the list
// output: file pointer to output too.
int read_file(file_type_t file_type, int x, int y, float **sheet, const char *filename);
// reads in the given file, assigning the values to sheet.
//
// file_type: Type of files in the list
// x: x dimension of the sheet
// y: y dimension of the sheet
// sheet[y][x]: 2D sheet of floats
// filename: filename to open
//
// returns:
// 0: success
// <0: error
#endif // TIP_TRACE_BINARY_H