]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/include/marContourVO.cpp
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / marContourVO.cpp
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 /*=========================================================================
27
28  Program:   wxMaracas
29  Module:    $RCSfile: marContourVO.cpp,v $
30  Language:  C++
31  Date:      $Date: 2012/11/15 14:15:31 $
32  Version:   $Revision: 1.2 $
33  
34   Copyright: (c) 2002, 2003
35   License:
36   
37    This software is distributed WITHOUT ANY WARRANTY; without even 
38    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
39    PURPOSE.  See the above copyright notice for more information.
40    
41 =========================================================================*/
42
43 #include "marContourVO.h"
44
45 // ----------------------------------------------------------------------------
46 marContour* marContourVO::getContour( ) {
47         return _contours;
48 }
49
50 // ----------------------------------------------------------------------------
51 void marContourVO::setContour(marContour* cont) {
52         _contours = cont;
53 }
54
55 // ----------------------------------------------------------------------------
56 vtkPoints* marContourVO::get3DContour( ) {
57         return _3Dcontour;
58 }
59
60 // ----------------------------------------------------------------------------
61 void marContourVO::set3DContour(vtkPoints* cont) {
62         _3Dcontour = cont;
63 }
64
65 // ----------------------------------------------------------------------------
66 vtkPolyData* marContourVO::get2DContour( ) {
67         return _2Dcontours;
68 }
69
70 // ----------------------------------------------------------------------------
71 void marContourVO::set2DContour(vtkPolyData* cont) {
72         _2Dcontours = cont;
73 }
74
75 // ----------------------------------------------------------------------------
76 vtkPoints* marContourVO::get2DDiameterMin( ) {
77         return _2DDiameterMin;
78 }
79
80 // ----------------------------------------------------------------------------
81 void marContourVO::set2DDiameterMin(vtkPoints* diam) {
82         _2DDiameterMin = diam;
83 }
84
85 // ----------------------------------------------------------------------------
86 vtkPoints* marContourVO::get2DDiameterMax( ) {
87         return _2DDiameterMax;
88 }
89
90 // ----------------------------------------------------------------------------
91 void marContourVO::set2DDiameterMax(vtkPoints* diam) {
92         _2DDiameterMax = diam;
93 }
94
95 // ----------------------------------------------------------------------------
96 double marContourVO::getSignal( ) {
97         return _signal;
98 }
99
100 // ----------------------------------------------------------------------------
101 void marContourVO::setSignal(double signal) {
102         _signal = signal;
103
104 }                               
105
106 // ----------------------------------------------------------------------------
107 int marContourVO::getType( ) {
108         return _contType;
109 }
110
111 // ----------------------------------------------------------------------------
112 void marContourVO::setType(int cont) {
113         _contType = cont;
114 }
115
116 // ----------------------------------------------------------------------------
117 vtkContourFilter* marContourVO::getIsocontour()
118 {
119         return _isocontour;
120 }
121
122 // ----------------------------------------------------------------------------
123 void marContourVO::setIsocontour(vtkContourFilter* iso)
124 {
125         _isocontour = iso;
126 }
127
128 // ----------------------------------------------------------------------------
129 vtkCleanPolyData* marContourVO::getIsocontourCpd()
130 {
131         return _isocontour_cpd;
132 }
133
134 // ----------------------------------------------------------------------------
135 void marContourVO::setIsocontourCpd(vtkCleanPolyData* isocpd)
136 {
137         _isocontour_cpd = isocpd;
138 }
139
140 // ----------------------------------------------------------------------------
141 vtkCleanPolyData* marContourVO::getIsocontourCpd2()
142 {
143         return _isocontour_cpd2;
144 }
145
146
147 // ----------------------------------------------------------------------------
148 void marContourVO::setIsocontourCpd2(vtkCleanPolyData* isocpd)
149 {
150         _isocontour_cpd2 = isocpd;
151 }
152
153 // ----------------------------------------------------------------------------
154 vtkPolyDataConnectivityFilter* marContourVO::getIsocontourDcf()
155 {
156         return _isocontour_dcf;
157 }
158
159 // ----------------------------------------------------------------------------
160 void marContourVO::setIsocontourDcf(vtkPolyDataConnectivityFilter*      isodcf)
161 {
162         _isocontour_dcf = isodcf;
163 }
164
165 // ----------------------------------------------------------------------------
166 vtkStripper* marContourVO::getIsocontourStripped()
167 {
168         return _isocontour_stripped;
169 }
170
171 // ----------------------------------------------------------------------------
172 void marContourVO::setIsocontourStripped(vtkStripper* isoStripped)
173 {
174         _isocontour_stripped = isoStripped;
175 }
176
177 // ----------------------------------------------------------------------------
178 marContourVO::~marContourVO()
179 {
180         if (_contours != NULL) { delete _contours; }
181         if (_3Dcontour != NULL) { _3Dcontour->Delete(); }
182         if (_2Dcontours != NULL) { _2Dcontours->Delete(); }
183         if (_2DDiameterMin != NULL) { _2DDiameterMin->Delete(); }
184         if (_2DDiameterMax != NULL) { _2DDiameterMax->Delete(); }
185         _signal = 0.0;
186         _contType = -1;
187         if (_isocontour != NULL) { _isocontour->Delete(); }
188         if (_isocontour_cpd != NULL) { _isocontour_cpd->Delete(); }
189         if (_isocontour_dcf != NULL) { _isocontour_dcf->Delete(); }
190         if (_isocontour_cpd2 != NULL) { _isocontour_cpd2->Delete(); }
191 }
192
193 // ----------------------------------------------------------------------------
194 bool marContourVO::isReplaced()
195 {
196         return _replaced;
197 }
198
199 // ----------------------------------------------------------------------------
200 void marContourVO::setReplaced(bool rep)
201 {
202         _replaced = rep;
203 }
204
205 marContourVO::marContourVO()
206 {
207         _replaced = false;
208 }