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 #include "manualViewBullEye.h"
28 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 manualViewBullEye::manualViewBullEye()
36 // ----------------------------------------------------------------------------
37 manualViewBullEye::~manualViewBullEye()
40 int i,size=lstSectorBullEye.size();
43 delete lstSectorBullEye[i];
45 lstSectorBullEye.clear();
49 // ----------------------------------------------------------------------------
50 manualViewBullEye * manualViewBullEye :: Clone()
52 manualViewBullEye * clone = new manualViewBullEye();
53 CopyAttributesTo(clone);
57 // ---------------------------------------------------------------------------
59 void manualViewBullEye::CopyAttributesTo( manualViewBullEye * cloneObject)
62 manualViewBaseContour::CopyAttributesTo(cloneObject);
66 // ----------------------------------------------------------------------------
67 int manualViewBullEye::GetType() // virtual
73 // ----------------------------------------------------------------------------
74 void manualViewBullEye::RefreshContour() // virtual
77 manualViewRoi::RefreshContour();
79 _manContModel->UpdateSpline();
80 int np = GetNumberOfPoints( );
81 // Refres sectors of BullEye(s)
85 int i,size = lstSectorBullEye.size();
88 lstSectorBullEye[i]->RefreshContour();
95 // ----------------------------------------------------------------------------
96 void manualViewBullEye::ConstructVTKObjects() // virtual
98 manualViewRoi::ConstructVTKObjects();
101 this->GetSpacing(spc);
102 manualViewBullEyeSector *mvbc;
103 manualContourModelBullEye *mcmbe = (manualContourModelBullEye*)this->_manContModel;
104 int i,size = mcmbe->GetSizeOfSectorLst();
105 for ( i=0 ; i<size ; i++ )
107 mvbc = new manualViewBullEyeSector();
108 mvbc->SetModel( mcmbe->GetModelSector(i) );
109 mvbc->SetWxVtkBaseView( this->GetWxVtkBaseView() );
112 mvbc->SetSpacing(spc);
113 mvbc->SetColorNormalContour(1, 0, 0);
114 // mvbc->SetColorEditContour(0.5, 0.5, 0.5);
115 // mvbc->SetColorSelectContour(1, 0.8, 0);
116 mvbc->SetWidthLine( this->GetWidthLine() );
118 mvbc->ConstructVTKObjects();
119 lstSectorBullEye.push_back( mvbc );
125 // ----------------------------------------------------------------------------
126 void manualViewBullEye::AddSplineActor() // virtual
128 manualViewRoi::AddSplineActor();
129 int i,size=lstSectorBullEye.size();
132 lstSectorBullEye[i]->AddSplineActor();
136 // ----------------------------------------------------------------------------
137 void manualViewBullEye::RemoveSplineActor() // virtual
139 manualViewRoi::RemoveSplineActor();
140 int i,size=lstSectorBullEye.size();
143 lstSectorBullEye[i]->RemoveSplineActor();