A class to represent one segmented frame in a heart perfusion series. More...
#include <mia/2d/segframe.hh>
Public Types | |
typedef std::vector< CSegSection > | Sections |
convenience typedef for the sections More... | |
typedef std::vector< Statistics > | SectionsStats |
convenience typedef for the section statistics vector More... | |
typedef std::pair< float, float > | Statistics |
Public Member Functions | |
CSegFrame () | |
CSegFrame (const std::string &image, const CSegStar &star, const Sections §ions) | |
CSegFrame (const CXMLElement &node, int version) | |
const C2DBoundingBox | get_boundingbox () const |
float | get_brightness () const |
float | get_contrast () const |
float | get_hausdorff_distance (const CSegFrame &other) const |
const std::string & | get_imagename () const |
size_t | get_nsections () const |
float | get_quality () const |
C2DUBImage | get_section_masks (const C2DBounds &size) const |
C2DUBImage | get_section_masks () const |
C2DUBImage | get_section_masks (size_t n_sections) const |
const Sections & | get_sections () const |
const CSegStar & | get_star () const |
SectionsStats | get_stats (const C2DUBImage &mask) const |
SectionsStats | get_stats (size_t n_sections) const |
void | inv_transform (const C2DTransformation &t) |
void | rename_base (const std::string &new_base) |
void | set_brightness (float b) |
void | set_contrast (float c) |
void | set_image (P2DImage image) |
void | set_imagename (const std::string &name) |
void | set_quality (float q) |
void | shift (const C2DFVector &delta, const std::string &cropped_file) |
void | transform (const C2DTransformation &t) |
void | write (CXMLElement &node, int version) const |
A class to represent one segmented frame in a heart perfusion series.
This class implements the frame of a myocardial segmentation consisting of six sections CSegsection, the segmentation helper CSegStar, and the name of the corresponding image file.
Definition at line 39 of file segframe.hh.
typedef std::vector<CSegSection> CSegFrame::Sections |
convenience typedef for the sections
Definition at line 42 of file segframe.hh.
typedef std::vector<Statistics> CSegFrame::SectionsStats |
convenience typedef for the section statistics vector
Definition at line 50 of file segframe.hh.
typedef std::pair<float, float> CSegFrame::Statistics |
convenience typedef for the statistics values
Definition at line 47 of file segframe.hh.
CSegFrame::CSegFrame | ( | ) |
CSegFrame::CSegFrame | ( | const std::string & | image, |
const CSegStar & | star, | ||
const Sections & | sections | ||
) |
Construct the segmentation frame from
image | image file name |
star | CSegStar |
sections | the segmentation sections |
CSegFrame::CSegFrame | ( | const CXMLElement & | node, |
int | version | ||
) |
Construct the segmentation frame from a XML root node
node | |
version | segmentation set version the node stems from. |
const C2DBoundingBox CSegFrame::get_boundingbox | ( | ) | const |
float CSegFrame::get_brightness | ( | ) | const |
float CSegFrame::get_contrast | ( | ) | const |
float CSegFrame::get_hausdorff_distance | ( | const CSegFrame & | other | ) | const |
Evaluate the Hausdorff distance of this segmentation frame to another
other |
const std::string& CSegFrame::get_imagename | ( | ) | const |
size_t CSegFrame::get_nsections | ( | ) | const |
float CSegFrame::get_quality | ( | ) | const |
C2DUBImage CSegFrame::get_section_masks | ( | const C2DBounds & | size | ) | const |
Evaluate a mask image based on the segmented sections
size | size of the output image |
C2DUBImage CSegFrame::get_section_masks | ( | ) | const |
Create the section masks by using the size of the image corresponding to the frame
C2DUBImage CSegFrame::get_section_masks | ( | size_t | n_sections | ) | const |
Create the section masks by using the size of the image corresponding to the frame. If the number of requested sections is equal to the number of sections stored, this call is equal to get_section_masks(), Otherwiese, instead of using the sections as defined, evaluate the union of all the sections and then split this union evenly in n_sections starting by the first directional ray and moving clockwiese with the star center as the angular point.
n_sections | number of target sections |
const Sections& CSegFrame::get_sections | ( | ) | const |
const CSegStar& CSegFrame::get_star | ( | ) | const |
SectionsStats CSegFrame::get_stats | ( | const C2DUBImage & | mask | ) | const |
Evaluate inetnsity mean and variation of the image data for the registions defined by the given mask image.
mask |
SectionsStats CSegFrame::get_stats | ( | size_t | n_sections | ) | const |
Evaluate inetnsity mean and variation of the image data for the registions defined the get_section_masks(size_t n_sections) method.
n_sections |
void CSegFrame::inv_transform | ( | const C2DTransformation & | t | ) |
transform the frame segmentation by the inverse of the given transformation
t |
void CSegFrame::rename_base | ( | const std::string & | new_base | ) |
rename the file name base of the image according to sed -e "s/.*[^0-9]\([0-9]*\..*\)/$new_base\1/"
new_base |
void CSegFrame::set_brightness | ( | float | b | ) |
set the brightness adjustment for the frame
b | 0=no adjustment |
void CSegFrame::set_contrast | ( | float | c | ) |
set contrast adjustment
c | 0=no adjustment |
void CSegFrame::set_image | ( | P2DImage | image | ) |
Set the image corresponding to the segmentation frame
image |
void CSegFrame::set_imagename | ( | const std::string & | name | ) |
set the file name of the corresponding image
name |
void CSegFrame::set_quality | ( | float | q | ) |
set the quality rating for the frame
q | 0=not set, 1-5 worst to best |
void CSegFrame::shift | ( | const C2DFVector & | delta, |
const std::string & | cropped_file | ||
) |
Shift the segmentation frame and change the file name to the new name corresponding to the shifted image
delta | translation |
cropped_file | new image file name |
void CSegFrame::transform | ( | const C2DTransformation & | t | ) |
transform the frame segmentation by a given transformation
t |
void CSegFrame::write | ( | CXMLElement & | node, |
int | version | ||
) | const |
Append the segmentation frame to a XML node
node | parent node to append the frame description to |
version | segmentation set file version that should be used to save the data |