Segmentation class to represent a section of the LV myocardium. More...
#include <mia/2d/segsection.hh>
Public Types | |
typedef std::vector< CSegPoint2D > | Points |
convenicence typedef for the points defining the section More... | |
Public Member Functions | |
void | append_to (C2DPolygon &polygon) const |
CSegSection () | |
default constructor More... | |
CSegSection (const std::string &id, const Points &points, bool is_open) | |
CSegSection (const CXMLElement &node, int version) | |
void | draw (C2DUBImage &output, unsigned char color) const |
void | draw_xor (C2DUBImage &output) const |
const C2DBoundingBox | get_boundingbox () const |
float | get_hausdorff_distance (const CSegSection &other) const |
const std::string & | get_id () const |
const Points & | get_points () const |
void | inv_transform (const C2DTransformation &t) |
bool | is_open () const |
void | shift (const C2DFVector &delta) |
void | transform (const C2DTransformation &t) |
void | write (CXMLElement &node, int version) const |
Segmentation class to represent a section of the LV myocardium.
Structure to save the segmentation of a section of the myocardium. In theory this can be used for any king of segmentation that uses a polynom to approximate a segmented 2D shape.
Definition at line 43 of file segsection.hh.
typedef std::vector<CSegPoint2D> CSegSection::Points |
convenicence typedef for the points defining the section
Definition at line 46 of file segsection.hh.
CSegSection::CSegSection | ( | ) |
default constructor
CSegSection::CSegSection | ( | const std::string & | id, |
const Points & | points, | ||
bool | is_open | ||
) |
Constructor to create a segmentation shape and naming it
id | ID of the section (and color identifier) |
points | the points that define a closed polynom representing the shape |
is_open | describes if points should be interpreted as polygon (i.e. the last point connects to the first), or as poly-line only. |
CSegSection::CSegSection | ( | const CXMLElement & | node, |
int | version | ||
) |
Constructor to create a segmentation shape based on a XML sub tree
node | root of the XML sub tree |
version | segmentation set version the node stems from. |
void CSegSection::append_to | ( | C2DPolygon & | polygon | ) | const |
Append this shape to another shape, a very crude version of a logical or
polygon | to add the shape to |
void CSegSection::draw | ( | C2DUBImage & | output, |
unsigned char | color | ||
) | const |
Draw the shape to a 2D image with a given color
output | image to draw to |
color | color to use |
void CSegSection::draw_xor | ( | C2DUBImage & | output | ) | const |
Draw the binary shape to a 2D image by xor-ing with what is already in there
output | image to draw to |
const C2DBoundingBox CSegSection::get_boundingbox | ( | ) | const |
float CSegSection::get_hausdorff_distance | ( | const CSegSection & | other | ) | const |
Evaluate the Hausdorff distance between this shape and another one
other |
const std::string& CSegSection::get_id | ( | ) | const |
const Points& CSegSection::get_points | ( | ) | const |
void CSegSection::inv_transform | ( | const C2DTransformation & | t | ) |
transform the shape by transforming its individual points
t | the inverse of the transformation to be applied |
bool CSegSection::is_open | ( | ) | const |
void CSegSection::shift | ( | const C2DFVector & | delta | ) |
translate the segmentation by a given shift
delta |
void CSegSection::transform | ( | const C2DTransformation & | t | ) |
transform the shape by transforming its individual points
t | the transformation to be applied |
void CSegSection::write | ( | CXMLElement & | node, |
int | version | ||
) | const |
Store the segmented section into a XML sub-tree
node | parent node to which the subtree should be added |
version | segmentation set version the node stems from. |