X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Fkernel%2Finclude%2FmarAxisContours.cpp;fp=lib%2FmaracasVisuLib%2Fsrc%2Fkernel%2Finclude%2FmarAxisContours.cpp;h=5d2b9013a8431c9bd95519930583db5e9510b050;hb=a4ee3758aa0477f677fb981e2c4d6e29995e8db8;hp=0000000000000000000000000000000000000000;hpb=cc20770ee090848c31a8f18c277d89f2b904e087;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp b/lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp new file mode 100644 index 0000000..5d2b901 --- /dev/null +++ b/lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp @@ -0,0 +1,87 @@ +/*========================================================================= + + Program: wxMaracas + Module: $RCSfile: marAxisContours.cpp,v $ + Language: C++ + Date: $Date: 2009/05/14 13:55:07 $ + 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(); +} +