marAxisContours.cpp

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: marAxisContours.cpp,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:55:07 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 #include "marAxisContours.h"
00018 
00019 
00020 
00021 // ----------------------------------------------------------------------------
00022 void marAxisContours::addContour(marContourVO* cont) {
00023 
00024         if (cont->getType() == LUMEN && contours.size() > 1)
00025         {
00026                 contours[LUMEN] = cont;
00027         } 
00028         else if (cont->getType() == WALL && contours.size() > 2)
00029         {
00030                 contours[WALL] = cont;
00031         }
00032         else
00033         {
00034                 contours.push_back(cont);
00035         }
00036         
00037 }
00038 
00039 // ----------------------------------------------------------------------------
00040 void marAxisContours::replaceContour(marContourVO* cont, int index) {
00041         if (contours.size() > index + 1)
00042         {
00043                 contours[index] = cont;
00044         }
00045         else
00046         {
00047                 contours.push_back(cont);
00048         }
00049 }
00050 
00051 // ----------------------------------------------------------------------------
00052 marContourVO* marAxisContours::getContour(int i ) {
00053 
00054         return contours[i];
00055 }
00056 
00057 // ----------------------------------------------------------------------------
00058 int marAxisContours::getTotalPlaques() {
00059         
00060         int tam = 0;
00061         for (int i = 0; i < contours.size(); i++)
00062         {
00063                 if (contours[i]->getType() == CALCIFICATION)
00064                 {
00065                         tam++;
00066                 }
00067         }
00068 
00069         return tam;
00070 }
00071 
00072 // ----------------------------------------------------------------------------
00073 int marAxisContours::getContourType(int i) {
00074         
00075         return contours[i]->getType();
00076 }
00077 
00078 int marAxisContours::getSize() {
00079         return contours.size();
00080 }
00081 
00082 // ----------------------------------------------------------------------------
00083 bool marAxisContours::isReplaced(int i)
00084 {
00085         return contours[i]->isReplaced();
00086 }
00087 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1