marIsocontour Class Reference

#include <marIsocontour.h>

List of all members.

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

Detailed Description

Definition at line 23 of file marIsocontour.h.


Constructor & Destructor Documentation

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.

00042                                           {
00043         this->intmax = intmax;
00044 }

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 }


Member Function Documentation

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

double marIsocontour::getMaxIntensity (  ) 

Definition at line 91 of file marIsocontour.cpp.

References intmax.

Referenced by marAxisCT::create2Dcontours().

00091                                       {
00092         return intmax;
00093 }

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

int marIsocontour::getSize (  ) 
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 }

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marIsocontour::setMaxIntensity ( double  intmax  ) 

Definition at line 130 of file marIsocontour.cpp.

00130                                                  {
00131         this->intmax = intmax;
00132 }

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 }

Here is the call graph for this function:

void marIsocontour::setType ( int  type  ) 

Definition at line 101 of file marIsocontour.cpp.

Referenced by marAxisCT::addPointToContour().

00101                                     {
00102         this->type = type;
00103 }

Here is the caller graph for this function:


Member Data Documentation

double marIsocontour::intmax [private]

Definition at line 48 of file marIsocontour.h.

Referenced by getMaxIntensity(), and marIsocontour().

std::vector<marPoint *> marIsocontour::listContour [private]
int marIsocontour::type [private]

Definition at line 49 of file marIsocontour.h.

Referenced by getType().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1