Container for a set of curves. More...
#include <msm_curve.h>
Public Member Functions | |
msm_curves () | |
Default constructor. | |
msm_curves (unsigned lo, unsigned hi, bool open=true, vcl_string name="") | |
Construct as a single curve. | |
int | which_curve (const vcl_string &name) const |
Return index of first curve with given name, or -1. | |
unsigned | max_index () const |
Return the largest index value in any curve. | |
void | config_from_stream (vcl_istream &) |
Parse parameters in stream. | |
bool | write_text_file (const vcl_string &path) |
Save to text file. | |
bool | read_text_file (const vcl_string &path) |
Read from text file. |
Container for a set of curves.
Definition at line 116 of file msm_curve.h.
msm_curves::msm_curves | ( | ) |
Default constructor.
Definition at line 186 of file msm_curve.cxx.
msm_curves::msm_curves | ( | unsigned | lo, |
unsigned | hi, | ||
bool | open = true , |
||
vcl_string | name = "" |
||
) |
Construct as a single curve.
Definition at line 192 of file msm_curve.cxx.
void msm_curves::config_from_stream | ( | vcl_istream & | is | ) |
Parse parameters in stream.
Expects
{ curve: { name: Chin open: true indices: { 0 1 2 3 4 5 6 } } curve: { name: Nose open: false indices: { 11 : 15 } } }
Definition at line 225 of file msm_curve.cxx.
unsigned msm_curves::max_index | ( | ) | const |
Return the largest index value in any curve.
Definition at line 208 of file msm_curve.cxx.
bool msm_curves::read_text_file | ( | const vcl_string & | path | ) |
Read from text file.
Definition at line 247 of file msm_curve.cxx.
int msm_curves::which_curve | ( | const vcl_string & | name | ) | const |
Return index of first curve with given name, or -1.
Definition at line 200 of file msm_curve.cxx.
bool msm_curves::write_text_file | ( | const vcl_string & | path | ) |
Save to text file.
Writes in format:
curves: { curve: { name: Chin open: true indices: { 0 1 2 3 4 5 6 } } curve: { name: Nose open: false indices: { 11 : 15 } } }
Definition at line 238 of file msm_curve.cxx.