2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
8 # This software is governed by the CeCILL-B license under French law and
9 # abiding by the rules of distribution of free software. You can use,
10 # modify and/ or redistribute the software under the terms of the CeCILL-B
11 # license as circulated by CEA, CNRS and INRIA at the following URL
12 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
13 # or in the file LICENSE.txt.
15 # As a counterpart to the access to the source code and rights to copy,
16 # modify and redistribute granted by the license, users are provided only
17 # with a limited warranty and the software's author, the holder of the
18 # economic rights, and the successive licensors have only limited
21 # The fact that you are presently reading this means that you have had
22 # knowledge of the CeCILL-B license and that you accept its terms.
23 # ------------------------------------------------------------------------
26 /*=========================================================================
32 =========================================================================*/
34 /* ---------------------------------------------------------------------
36 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
37 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
39 * This software is governed by the CeCILL-B license under French law and
40 * abiding by the rules of distribution of free software. You can use,
41 * modify and/ or redistribute the software under the terms of the CeCILL-B
42 * license as circulated by CEA, CNRS and INRIA at the following URL
43 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
44 * or in the file LICENSE.txt.
46 * As a counterpart to the access to the source code and rights to copy,
47 * modify and redistribute granted by the license, users are provided only
48 * with a limited warranty and the software's author, the holder of the
49 * economic rights, and the successive licensors have only limited
52 * The fact that you are presently reading this means that you have had
53 * knowledge of the CeCILL-B license and that you accept its terms.
54 * ------------------------------------------------------------------------ */
58 * \brief Class bbtk::manualConnectorContourView
62 #include "manualConnectorContourView.h"
68 //=========================================================================
70 manualConnectorContourView::manualConnectorContourView()
74 //=========================================================================
76 manualConnectorContourView::~manualConnectorContourView()
80 //=========================================================================
82 void manualConnectorContourView::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type)
84 // Make the conversion using the system of creaMaracasVisu
85 _wxvtkbaseview->TransCoordScreenToWorld(X,Y,Z,type);
88 //=========================================================================
90 void manualConnectorContourView::updateStartAndEnd(double* start , double* end)
92 // Update contour first and last point
93 _manContModel->MovePoint(0,start[0],start[1],start[2]);
94 _manContModel->MovePoint(_manContModel->GetSizeLstPoints()-1,end[0],end[1],end[2]);
99 //=========================================================================
101 void manualConnectorContourView::AddControlPoints()
103 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
104 SetIfViewControlPoints( true );
105 if( _viewControlPoints )
107 int i,size=_lstViewPoints.size();
108 //The first and last points are avoided
109 for (i=1;i<size-1; i++)
111 vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor();
112 theRenderer->AddActor( pointActor );
117 //=========================================================================
119 void manualConnectorContourView::RefreshText() // virtual
121 // The text that goes with the contour is not shown
125 } // EO namespace bbtk