1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
26 /*=========================================================================
29 Module: $RCSfile: marContourVO.cpp,v $
31 Date: $Date: 2012/11/15 14:15:31 $
32 Version: $Revision: 1.2 $
34 Copyright: (c) 2002, 2003
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.
41 =========================================================================*/
43 #include "marContourVO.h"
45 // ----------------------------------------------------------------------------
46 marContour* marContourVO::getContour( ) {
50 // ----------------------------------------------------------------------------
51 void marContourVO::setContour(marContour* cont) {
55 // ----------------------------------------------------------------------------
56 vtkPoints* marContourVO::get3DContour( ) {
60 // ----------------------------------------------------------------------------
61 void marContourVO::set3DContour(vtkPoints* cont) {
65 // ----------------------------------------------------------------------------
66 vtkPolyData* marContourVO::get2DContour( ) {
70 // ----------------------------------------------------------------------------
71 void marContourVO::set2DContour(vtkPolyData* cont) {
75 // ----------------------------------------------------------------------------
76 vtkPoints* marContourVO::get2DDiameterMin( ) {
77 return _2DDiameterMin;
80 // ----------------------------------------------------------------------------
81 void marContourVO::set2DDiameterMin(vtkPoints* diam) {
82 _2DDiameterMin = diam;
85 // ----------------------------------------------------------------------------
86 vtkPoints* marContourVO::get2DDiameterMax( ) {
87 return _2DDiameterMax;
90 // ----------------------------------------------------------------------------
91 void marContourVO::set2DDiameterMax(vtkPoints* diam) {
92 _2DDiameterMax = diam;
95 // ----------------------------------------------------------------------------
96 double marContourVO::getSignal( ) {
100 // ----------------------------------------------------------------------------
101 void marContourVO::setSignal(double signal) {
106 // ----------------------------------------------------------------------------
107 int marContourVO::getType( ) {
111 // ----------------------------------------------------------------------------
112 void marContourVO::setType(int cont) {
116 // ----------------------------------------------------------------------------
117 vtkContourFilter* marContourVO::getIsocontour()
122 // ----------------------------------------------------------------------------
123 void marContourVO::setIsocontour(vtkContourFilter* iso)
128 // ----------------------------------------------------------------------------
129 vtkCleanPolyData* marContourVO::getIsocontourCpd()
131 return _isocontour_cpd;
134 // ----------------------------------------------------------------------------
135 void marContourVO::setIsocontourCpd(vtkCleanPolyData* isocpd)
137 _isocontour_cpd = isocpd;
140 // ----------------------------------------------------------------------------
141 vtkCleanPolyData* marContourVO::getIsocontourCpd2()
143 return _isocontour_cpd2;
147 // ----------------------------------------------------------------------------
148 void marContourVO::setIsocontourCpd2(vtkCleanPolyData* isocpd)
150 _isocontour_cpd2 = isocpd;
153 // ----------------------------------------------------------------------------
154 vtkPolyDataConnectivityFilter* marContourVO::getIsocontourDcf()
156 return _isocontour_dcf;
159 // ----------------------------------------------------------------------------
160 void marContourVO::setIsocontourDcf(vtkPolyDataConnectivityFilter* isodcf)
162 _isocontour_dcf = isodcf;
165 // ----------------------------------------------------------------------------
166 vtkStripper* marContourVO::getIsocontourStripped()
168 return _isocontour_stripped;
171 // ----------------------------------------------------------------------------
172 void marContourVO::setIsocontourStripped(vtkStripper* isoStripped)
174 _isocontour_stripped = isoStripped;
177 // ----------------------------------------------------------------------------
178 marContourVO::~marContourVO()
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(); }
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(); }
193 // ----------------------------------------------------------------------------
194 bool marContourVO::isReplaced()
199 // ----------------------------------------------------------------------------
200 void marContourVO::setReplaced(bool rep)
205 marContourVO::marContourVO()