#include <marIsocontour.h>
Public Member Functions | |
marIsocontour () | |
marIsocontour (double intmax) | |
virtual | ~marIsocontour () |
void | getCG (double *x, double *y) |
void | insertPoint (double x, double y) |
void | getPoint (int i, double *x, double *y) |
void | setPoint (int i, double x, double y) |
int | getSize () |
double | getMaxIntensity () |
void | setMaxIntensity (double intmax) |
int | getType () |
void | setType (int type) |
int | getDir (int i) |
void | setDir (int i, int direction) |
void | setInside (int i, bool ins) |
bool | getInside (int i) |
void | removeLastPoint () |
Private Attributes | |
std::vector< marPoint * > | listContour |
double | intmax |
int | type |
Definition at line 23 of file marIsocontour.h.
marIsocontour::marIsocontour | ( | ) |
Definition at line 22 of file marIsocontour.cpp.
References intmax.
00022 { 00023 intmax = -1; 00024 }
marIsocontour::marIsocontour | ( | double | intmax | ) |
Definition at line 42 of file marIsocontour.cpp.
marIsocontour::~marIsocontour | ( | ) | [virtual] |
Definition at line 27 of file marIsocontour.cpp.
References listContour.
00027 { 00028 00029 //TODO - SACAR A UTILS 00030 for (int ind = 0; ind < listContour.size(); ind++) 00031 { 00032 marPoint* p = listContour[ind]; 00033 listContour[ind] = NULL; 00034 delete p; 00035 00036 } 00037 listContour.clear(); 00038 00039 }
void marIsocontour::getCG | ( | double * | x, | |
double * | y | |||
) |
Definition at line 47 of file marIsocontour.cpp.
References getPoint(), and listContour.
Referenced by marAxisCT::create2Dcontours(), and marAxisCT::extractLumen().
00047 { 00048 double sumax = 0; 00049 double sumay = 0; 00050 00051 for (int i = 0; i < listContour.size(); i++){ 00052 double x, y; 00053 getPoint(i, &x, &y); 00054 sumax +=x; 00055 sumay +=y; 00056 } 00057 00058 sumax /= listContour.size(); 00059 sumay /= listContour.size(); 00060 00061 *x = (double) sumax; 00062 *y = (double) sumay; 00063 }
int marIsocontour::getDir | ( | int | i | ) |
Definition at line 106 of file marIsocontour.cpp.
References marPoint::getDirection(), and listContour.
Referenced by marAxisCT::detectNeighbor(), marAxisCT::getCalcStatistics(), marAxisCT::getStatistics(), and marAxisCT::unifyDividedStructure().
00106 { 00107 marPoint* p = listContour[i]; 00108 return p->getDirection(); 00109 }
bool marIsocontour::getInside | ( | int | i | ) |
Definition at line 124 of file marIsocontour.cpp.
References marPoint::getInside(), and listContour.
Referenced by marAxisCT::unifyDividedStructure().
00124 { 00125 marPoint* p = listContour[i]; 00126 return p->getInside(); 00127 }
double marIsocontour::getMaxIntensity | ( | ) |
Definition at line 91 of file marIsocontour.cpp.
References intmax.
Referenced by marAxisCT::create2Dcontours().
00091 { 00092 return intmax; 00093 }
void marIsocontour::getPoint | ( | int | i, | |
double * | x, | |||
double * | y | |||
) |
Definition at line 72 of file marIsocontour.cpp.
References marPoint::getX(), marPoint::getY(), and listContour.
Referenced by marAxisCT::filterContour(), marAxisCT::generateFile(), marAxisCT::getCalcStatistics(), getCG(), marAxisCT::getStatistics(), marAxisCT::obtainContourArea(), marAxisCT::pointInPolygon(), and marAxisCT::unifyDividedStructure().
00072 { 00073 marPoint* p = listContour[i]; 00074 *x = p->getX(); 00075 *y = p->getY(); 00076 00077 }
int marIsocontour::getSize | ( | ) |
Definition at line 86 of file marIsocontour.cpp.
References listContour.
Referenced by marAxisCT::addPointToContour(), marAxisCT::detectNeighbor(), marAxisCT::filterContour(), marAxisCT::generateFile(), marAxisCT::getCalcStatistics(), marAxisCT::getStatistics(), marAxisCT::obtainContourArea(), marAxisCT::pointInPolygon(), and marAxisCT::unifyDividedStructure().
00086 { 00087 return listContour.size(); 00088 }
int marIsocontour::getType | ( | ) |
Definition at line 96 of file marIsocontour.cpp.
References type.
Referenced by marAxisCT::create2Dcontours(), and marAxisCT::detectNeighbor().
00096 { 00097 return type; 00098 }
void marIsocontour::insertPoint | ( | double | x, | |
double | y | |||
) |
Definition at line 66 of file marIsocontour.cpp.
References listContour.
Referenced by marAxisCT::addPointToContour(), marAxisCT::filterContour(), marAxisCT::loadMarIsocontour(), marAxisCT::parsePolyDataToMarIsocontour(), and marAxisCT::unifyDividedStructure().
00066 { 00067 marPoint* p = new marPoint(x, y); 00068 listContour.push_back(p); 00069 }
void marIsocontour::removeLastPoint | ( | ) |
Definition at line 135 of file marIsocontour.cpp.
References listContour.
00135 { 00136 listContour.pop_back(); 00137 }
void marIsocontour::setDir | ( | int | i, | |
int | direction | |||
) |
Definition at line 112 of file marIsocontour.cpp.
References listContour, and marPoint::setDirection().
Referenced by marAxisCT::addPointToContour(), and marAxisCT::unifyDividedStructure().
00112 { 00113 marPoint *p = listContour[i]; 00114 p->setDirection(direction); 00115 }
void marIsocontour::setInside | ( | int | i, | |
bool | ins | |||
) |
Definition at line 118 of file marIsocontour.cpp.
References listContour, and marPoint::setInside().
Referenced by marAxisCT::addPointToContour(), and marAxisCT::unifyDividedStructure().
00118 { 00119 marPoint *p = listContour[i]; 00120 p->setInside(ins); 00121 }
void marIsocontour::setMaxIntensity | ( | double | intmax | ) |
Definition at line 130 of file marIsocontour.cpp.
void marIsocontour::setPoint | ( | int | i, | |
double | x, | |||
double | y | |||
) |
Definition at line 80 of file marIsocontour.cpp.
References listContour, and marPoint::setPoint().
00080 { 00081 marPoint *p = listContour[i]; 00082 p->setPoint(x, y); 00083 }
void marIsocontour::setType | ( | int | type | ) |
Definition at line 101 of file marIsocontour.cpp.
Referenced by marAxisCT::addPointToContour().
double marIsocontour::intmax [private] |
Definition at line 48 of file marIsocontour.h.
Referenced by getMaxIntensity(), and marIsocontour().
std::vector<marPoint *> marIsocontour::listContour [private] |
Definition at line 47 of file marIsocontour.h.
Referenced by getCG(), getDir(), getInside(), getPoint(), getSize(), insertPoint(), removeLastPoint(), setDir(), setInside(), setPoint(), and ~marIsocontour().
int marIsocontour::type [private] |
Definition at line 49 of file marIsocontour.h.
Referenced by getType().