/*========================================================================= Program: wxMaracas Module: $RCSfile: marAxisContours.cpp,v $ Language: C++ Date: $Date: 2008/10/31 16:32:54 $ Version: $Revision: 1.1 $ Copyright: (c) 2002, 2003 License: This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "marAxisContours.h" // ---------------------------------------------------------------------------- void marAxisContours::addContour(marContourVO* cont) { if (cont->getType() == LUMEN && contours.size() > 1) { contours[LUMEN] = cont; } else if (cont->getType() == WALL && contours.size() > 2) { contours[WALL] = cont; } else { contours.push_back(cont); } } // ---------------------------------------------------------------------------- void marAxisContours::replaceContour(marContourVO* cont, int index) { if (contours.size() > index + 1) { contours[index] = cont; } else { contours.push_back(cont); } } // ---------------------------------------------------------------------------- marContourVO* marAxisContours::getContour(int i ) { return contours[i]; } // ---------------------------------------------------------------------------- int marAxisContours::getTotalPlaques() { int tam = 0; for (int i = 0; i < contours.size(); i++) { if (contours[i]->getType() == CALCIFICATION) { tam++; } } return tam; } // ---------------------------------------------------------------------------- int marAxisContours::getContourType(int i) { return contours[i]->getType(); } int marAxisContours::getSize() { return contours.size(); } // ---------------------------------------------------------------------------- bool marAxisContours::isReplaced(int i) { return contours[i]->isReplaced(); }