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 "manualContour3V3DControler.h"
29 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 manualContour3V3DControler::manualContour3V3DControler()
35 _manualcontour3Vcontroler(NULL)
38 // ----------------------------------------------------------------------------
39 manualContour3V3DControler::~manualContour3V3DControler()
43 // ----------------------------------------------------------------------------
44 manualContour3V3DControler * manualContour3V3DControler :: Clone() // virtual
46 manualContour3V3DControler * clone = new manualContour3V3DControler();
47 CopyAttributesTo(clone);
51 // ---------------------------------------------------------------------------
52 void manualContour3V3DControler::CopyAttributesTo( manualContour3V3DControler * cloneObject)
55 manualContour3DControler::CopyAttributesTo(cloneObject);
57 cloneObject->SetManualContour3VControler( this->GetManualContour3VControler() );
59 // ----------------------------------------------------------------------------
60 void manualContour3V3DControler::InsertPoint(int x, int y, int z ) // virtual
62 manualContour3DControler::InsertPoint( x, y, z );
63 _manualcontour3Vcontroler->InsertPoint_Others(0);
65 // ----------------------------------------------------------------------------
66 void manualContour3V3DControler::AddPoint( int x, int y, int z )
68 manualContour3DControler::AddPoint( x, y, z );
69 if (_manualcontour3Vcontroler!=NULL)
71 _manualcontour3Vcontroler->AddPoint_Others();
74 // ----------------------------------------------------------------------------
75 void manualContour3V3DControler::DeleteActualMousePoint(int x, int y)
77 int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() );
78 manualContour3DControler::DeleteActualMousePoint( x , y );
79 _manualcontour3Vcontroler->DeleteActualMousePoint_Others(id);
81 // ----------------------------------------------------------------------------
82 void manualContour3V3DControler::MouseMove( int x, int y )
84 int ss =this->_vtkInteractorStyleBaseView->vtkInteractorStyle::GetState();
85 if ((this->GetState()!=7) && (ss!=1)){
86 manualContour3DControler::MouseMove( x , y );
87 int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() );
88 if (_manualcontour3Vcontroler!=NULL)
90 _manualcontour3Vcontroler->MouseMove_Others(id);
94 // ----------------------------------------------------------------------------
95 void manualContour3V3DControler::SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler)
97 _manualcontour3Vcontroler = manualcontour3Vcontroler;
99 // ----------------------------------------------------------------------------
100 manualContour3VControler *manualContour3V3DControler::GetManualContour3VControler()
102 return _manualcontour3Vcontroler;
104 // ----------------------------------------------------------------------------
105 bool manualContour3V3DControler::OnChar() // virtual
107 if (manualContour3DControler::OnChar()==false )
109 _manualcontour3Vcontroler->OnChar_Others();
114 // ----------------------------------------------------------------------------
115 void manualContour3V3DControler::ResetContour() // virtual
117 manualContourControler::ResetContour();
118 _manualcontour3Vcontroler->ResetContour_Others();