]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / marAxisContours.cpp
diff --git a/lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp b/lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp
new file mode 100644 (file)
index 0000000..5d2b901
--- /dev/null
@@ -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();
+}
+