NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Enumerations | Functions | Variables
niftkMeshFromLabels.cxx File Reference
Include dependency graph for niftkMeshFromLabels.cxx:

Enumerations

enum  _cmdLineArgs {
  O_SURF = 0, O_SEPARATE, O_OUTPUT, O_LABELS,
  O_FACETANGLE, O_FACETEDGE, O_FACETERROR, O_CELLSIZE,
  O_CELLRATIO, O_INPUT_VOL
}
 

Functions

static bool _ParseLabel (std::vector< int > &r_dstList, const std::string &labelString)
 
static bool _ParseLabelList (std::vector< int > &r_dstList, const std::string &labelList, const boost::char_separator< char > &separator)
 
static bool _WriteMesh (vtkSmartPointer< vtkUnstructuredGrid > sp_grid, const std::string &path)
 
static std::string _LabelListToString (const std::vector< int > &labels)
 
int main (int argc, char *argv[])
 

Variables

static
niftk::CommandLineArgumentDescription 
g_opts []
 

Enumeration Type Documentation

Enumerator
O_SURF 
O_SEPARATE 
O_OUTPUT 
O_LABELS 
O_FACETANGLE 
O_FACETEDGE 
O_FACETERROR 
O_CELLSIZE 
O_CELLRATIO 
O_INPUT_VOL 

Function Documentation

static std::string _LabelListToString ( const std::vector< int > &  labels)
static
static bool _ParseLabel ( std::vector< int > &  r_dstList,
const std::string labelString 
)
static
static bool _ParseLabelList ( std::vector< int > &  r_dstList,
const std::string labelList,
const boost::char_separator< char > &  separator 
)
static
static bool _WriteMesh ( vtkSmartPointer< vtkUnstructuredGrid >  sp_grid,
const std::string path 
)
static
int main ( int  argc,
char *  argv[] 
)

Variable Documentation

Initial value:
= {
{ OPT_SWITCH, "surf", 0, "Generate only a surface mesh" },
{ OPT_SWITCH, "separate", 0, "Generate one mesh from every label separately. If this flag is set, the output path (specified with the \"output\" flag) is treated as a prefix and the resulting meshes will receive a suffix based on the labels from which the mesh was generated." },
{ OPT_STRING, "output", "PATH TO OUTPUT FILE", "Output path (default: \"./out.vtk\" or \"./out\")" },
{ OPT_STRING, "labels", "LABEL VALUES", "Request sub-mesh with specific label value. Labels are specified as comma separated list LABEL1,LABEL2..,LABELN. If one mesh is to be generated from more than one label the corresponding labels need to be separated with semicolons (LABELP; ..; LABELQ), also the \"separate\" flag needs to be set."},
{ OPT_FLOAT, "facet-angle", "MIN. ADMISSIBLE FACET ANGLE", "Mesh quality criterion: min. admissible surface facet angle, in deg. (default: 30)." },
{ OPT_FLOAT, "facet-edge", "MAX. ADMISSIBLE FACET EDGE LEN.", "Mesh quality criterion: max. admissible surface facet edge length (default: 6)." },
{ OPT_FLOAT, "bdy-error", "MAX. ADMISSIBLE BDY APPROX. ERR", "Mesh quality criterion: max. admissible boundary approximation error (default: 4)." },
{ OPT_FLOAT, "cell-size", "MAX. ADMISSIBLE CELL SIZE", "Mesh quality criterion: max. admissible tetrahedron edge (default: 8)." },
{ OPT_FLOAT, "edge-radius", "MAX. EDGE-CIRCUMBALL-RADIUS RATIO", "Mesh quality criterion: max. admissible ratio of cell circumball radius-min. edge (default: 3)." },
{ OPT_STRING | OPT_LONELY | OPT_REQ, "LABEL VOLUME", "PATH TO INPUT LABEL VOL", "The input image." },
{ OPT_DONE, NULL, NULL, "Program to generate meshes from label volumes." }
}
#define OPT_DONE
No more options - must terminate array.
Definition: niftkCommandLineParser.h:103
#define OPT_REQ
Option is always required.
Definition: niftkCommandLineParser.h:116
#define OPT_LONELY
Parameter doesn't have key.
Definition: niftkCommandLineParser.h:115
#define OPT_FLOAT
Option takes one float.
Definition: niftkCommandLineParser.h:88
#define OPT_STRING
Option takes one string.
Definition: niftkCommandLineParser.h:89
#define OPT_SWITCH
Option is boolean switch.
Definition: niftkCommandLineParser.h:86