]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/include/marAxisContours.cpp
BUG macOs
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / marAxisContours.cpp
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: marAxisContours.cpp,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:55:07 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11
12      This software is distributed WITHOUT ANY WARRANTY; without even
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14      PURPOSE.  See the above copyright notice for more information.
15
16 =========================================================================*/
17 #include "marAxisContours.h"
18
19
20
21 // ----------------------------------------------------------------------------
22 void marAxisContours::addContour(marContourVO* cont) {
23
24         if (cont->getType() == LUMEN && contours.size() > 1)
25         {
26                 contours[LUMEN] = cont;
27         } 
28         else if (cont->getType() == WALL && contours.size() > 2)
29         {
30                 contours[WALL] = cont;
31         }
32         else
33         {
34                 contours.push_back(cont);
35         }
36         
37 }
38
39 // ----------------------------------------------------------------------------
40 void marAxisContours::replaceContour(marContourVO* cont, int index) {
41         if (contours.size() > index + 1)
42         {
43                 contours[index] = cont;
44         }
45         else
46         {
47                 contours.push_back(cont);
48         }
49 }
50
51 // ----------------------------------------------------------------------------
52 marContourVO* marAxisContours::getContour(int i ) {
53
54         return contours[i];
55 }
56
57 // ----------------------------------------------------------------------------
58 int marAxisContours::getTotalPlaques() {
59         
60         int tam = 0;
61         for (int i = 0; i < contours.size(); i++)
62         {
63                 if (contours[i]->getType() == CALCIFICATION)
64                 {
65                         tam++;
66                 }
67         }
68
69         return tam;
70 }
71
72 // ----------------------------------------------------------------------------
73 int marAxisContours::getContourType(int i) {
74         
75         return contours[i]->getType();
76 }
77
78 int marAxisContours::getSize() {
79         return contours.size();
80 }
81
82 // ----------------------------------------------------------------------------
83 bool marAxisContours::isReplaced(int i)
84 {
85         return contours[i]->isReplaced();
86 }
87