openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Macros | Functions
IGBextract.cc File Reference
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include "IGBheader.h"
#include <assert.h>
#include "ext_cmdline.h"
#include <vector>
#include <algorithm>
Include dependency graph for IGBextract.cc:

Go to the source code of this file.

Macros

#define BUFSIZE   1024
 

Functions

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[])
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   1024

Function Documentation

◆ extract_nodes()

void extract_nodes ( const char *  list,
vector< int > &  nodes,
int  max 
)

Definition at line 116 of file IGBextract.cc.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 346 of file IGBextract.cc.

◆ outfile()

string outfile ( string  specified,
enum_format  format,
int  s = -1 
)

determine file name for output

Parameters
specifiedspecified file name
formatoutput format
sslice number
Returns
proper file name

Definition at line 157 of file IGBextract.cc.

Here is the caller graph for this function:

◆ 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
inoriginal data file
nodesnodes to output
hheader of original data
ofnameoutput file name, "-" for stdout
offormat of output
t0first frame to output
t1last frame
strideframe stride

Definition at line 208 of file IGBextract.cc.

Here is the caller graph for this function:

◆ 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
spuser specified string of nodes
nodeslist of nodes
maxnumber 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.

Here is the caller graph for this function:

◆ read_nodes()

void read_nodes ( char *  file,
vector< int > &  nodes,
int  max 
)

Definition at line 131 of file IGBextract.cc.

Here is the caller graph for this function: