#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include "IGBheader.h"
#include <assert.h>
#include "ext_cmdline.h"
#include <vector>
#include <algorithm>
Go to the source code of this file.
|
bool | process_specifier (char *sp, vector< int > &nodes, int max) |
|
void | extract_nodes (const char *list, vector< int > &nodes, int max) |
|
void | read_nodes (char *file, vector< int > &nodes, int max) |
|
string | outfile (string specified, enum_format format, int s=-1) |
|
void | output (vector< int > nodes, IGBheader *h, char *ofname, enum_format of, int t0, int t1, int stride, bool explode, float scale) |
|
int | main (int argc, char *argv[]) |
|
◆ BUFSIZE
◆ extract_nodes()
void extract_nodes |
( |
const char * |
list, |
|
|
vector< int > & |
nodes, |
|
|
int |
max |
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ outfile()
string outfile |
( |
string |
specified, |
|
|
enum_format |
format, |
|
|
int |
s = -1 |
|
) |
| |
determine file name for output
- Parameters
-
specified | specified file name |
format | output format |
s | slice number |
- Returns
- proper file name
Definition at line 157 of file IGBextract.cc.
◆ output()
void output |
( |
vector< int > |
nodes, |
|
|
IGBheader * |
h, |
|
|
char * |
ofname, |
|
|
enum_format |
of, |
|
|
int |
t0, |
|
|
int |
t1, |
|
|
int |
stride, |
|
|
bool |
explode, |
|
|
float |
scale |
|
) |
| |
output the requested node data
- Parameters
-
in | original data file |
nodes | nodes to output |
h | header of original data |
ofname | output file name, "-" for stdout |
of | format of output |
t0 | first frame to output |
t1 | last frame |
stride | frame stride |
Definition at line 208 of file IGBextract.cc.
◆ process_specifier()
bool process_specifier |
( |
char * |
sp, |
|
|
vector< int > & |
nodes, |
|
|
int |
max |
|
) |
| |
get list of specified nodes from a string: ([0-9]?[-([0-9]+|*)|*)[:[0-9]+] This mean you can specify n -> node n n0-n1 -> nodes n0 to n1 inclusive n-* -> all nodes starting at n
- -> all nodes To any of these, :d may be appended on the end signifying stride d
- Parameters
-
sp | user specified string of nodes |
nodes | list of nodes |
max | number of nodes in model |
- Postcondition
- nodes contains all the specified nodes
- Returns
- true iff all nodes have been specified
Definition at line 51 of file IGBextract.cc.
◆ read_nodes()
void read_nodes |
( |
char * |
file, |
|
|
vector< int > & |
nodes, |
|
|
int |
max |
|
) |
| |