]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/marContourVO.cpp
23765e51eb749fe1ca4d55b81448038373fc1bea
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / marContourVO.cpp
1 /*=========================================================================
2
3  Program:   wxMaracas
4  Module:    $RCSfile: marContourVO.cpp,v $
5  Language:  C++
6  Date:      $Date: 2008/10/31 16:32:54 $
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
18 #include "marContourVO.h"
19
20 // ----------------------------------------------------------------------------
21 marContour* marContourVO::getContour( ) {
22         return _contours;
23 }
24
25 // ----------------------------------------------------------------------------
26 void marContourVO::setContour(marContour* cont) {
27         _contours = cont;
28 }
29
30 // ----------------------------------------------------------------------------
31 vtkPoints* marContourVO::get3DContour( ) {
32         return _3Dcontour;
33 }
34
35 // ----------------------------------------------------------------------------
36 void marContourVO::set3DContour(vtkPoints* cont) {
37         _3Dcontour = cont;
38 }
39
40 // ----------------------------------------------------------------------------
41 vtkPolyData* marContourVO::get2DContour( ) {
42         return _2Dcontours;
43 }
44
45 // ----------------------------------------------------------------------------
46 void marContourVO::set2DContour(vtkPolyData* cont) {
47         _2Dcontours = cont;
48 }
49
50 // ----------------------------------------------------------------------------
51 vtkPoints* marContourVO::get2DDiameterMin( ) {
52         return _2DDiameterMin;
53 }
54
55 // ----------------------------------------------------------------------------
56 void marContourVO::set2DDiameterMin(vtkPoints* diam) {
57         _2DDiameterMin = diam;
58 }
59
60 // ----------------------------------------------------------------------------
61 vtkPoints* marContourVO::get2DDiameterMax( ) {
62         return _2DDiameterMax;
63 }
64
65 // ----------------------------------------------------------------------------
66 void marContourVO::set2DDiameterMax(vtkPoints* diam) {
67         _2DDiameterMax = diam;
68 }
69
70 // ----------------------------------------------------------------------------
71 double marContourVO::getSignal( ) {
72         return _signal;
73 }
74
75 // ----------------------------------------------------------------------------
76 void marContourVO::setSignal(double signal) {
77         _signal = signal;
78
79 }                               
80
81 // ----------------------------------------------------------------------------
82 int marContourVO::getType( ) {
83         return _contType;
84 }
85
86 // ----------------------------------------------------------------------------
87 void marContourVO::setType(int cont) {
88         _contType = cont;
89 }
90
91 // ----------------------------------------------------------------------------
92 vtkContourFilter* marContourVO::getIsocontour()
93 {
94         return _isocontour;
95 }
96
97 // ----------------------------------------------------------------------------
98 void marContourVO::setIsocontour(vtkContourFilter* iso)
99 {
100         _isocontour = iso;
101 }
102
103 // ----------------------------------------------------------------------------
104 vtkCleanPolyData* marContourVO::getIsocontourCpd()
105 {
106         return _isocontour_cpd;
107 }
108
109 // ----------------------------------------------------------------------------
110 void marContourVO::setIsocontourCpd(vtkCleanPolyData* isocpd)
111 {
112         _isocontour_cpd = isocpd;
113 }
114
115 // ----------------------------------------------------------------------------
116 vtkCleanPolyData* marContourVO::getIsocontourCpd2()
117 {
118         return _isocontour_cpd2;
119 }
120
121
122 // ----------------------------------------------------------------------------
123 void marContourVO::setIsocontourCpd2(vtkCleanPolyData* isocpd)
124 {
125         _isocontour_cpd2 = isocpd;
126 }
127
128 // ----------------------------------------------------------------------------
129 vtkPolyDataConnectivityFilter* marContourVO::getIsocontourDcf()
130 {
131         return _isocontour_dcf;
132 }
133
134 // ----------------------------------------------------------------------------
135 void marContourVO::setIsocontourDcf(vtkPolyDataConnectivityFilter*      isodcf)
136 {
137         _isocontour_dcf = isodcf;
138 }
139
140 // ----------------------------------------------------------------------------
141 vtkStripper* marContourVO::getIsocontourStripped()
142 {
143         return _isocontour_stripped;
144 }
145
146 // ----------------------------------------------------------------------------
147 void marContourVO::setIsocontourStripped(vtkStripper* isoStripped)
148 {
149         _isocontour_stripped = isoStripped;
150 }
151
152 // ----------------------------------------------------------------------------
153 marContourVO::~marContourVO()
154 {
155         if (_contours != NULL) { delete _contours; }
156         if (_3Dcontour != NULL) { _3Dcontour->Delete(); }
157         if (_2Dcontours != NULL) { _2Dcontours->Delete(); }
158         if (_2DDiameterMin != NULL) { _2DDiameterMin->Delete(); }
159         if (_2DDiameterMax != NULL) { _2DDiameterMax->Delete(); }
160         _signal = 0.0;
161         _contType = -1;
162         if (_isocontour != NULL) { _isocontour->Delete(); }
163         if (_isocontour_cpd != NULL) { _isocontour_cpd->Delete(); }
164         if (_isocontour_dcf != NULL) { _isocontour_dcf->Delete(); }
165         if (_isocontour_cpd2 != NULL) { _isocontour_cpd2->Delete(); }
166 }
167
168 // ----------------------------------------------------------------------------
169 bool marContourVO::isReplaced()
170 {
171         return _replaced;
172 }
173
174 // ----------------------------------------------------------------------------
175 void marContourVO::setReplaced(bool rep)
176 {
177         _replaced = rep;
178 }
179
180 marContourVO::marContourVO()
181 {
182         _replaced = false;
183 }