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 #ifndef manualViewPoint_h
27 #define manualViewPoint_h
29 #include "vtkRenderWindow.h"
31 #include "vtkRenderer.h"
32 #include "vtkRenderWindowInteractor.h" //extremely important with VC++ don't remove !
33 #include "vtkCommand.h"
34 #include "vtkPolyData.h"
35 #include "vtkCellArray.h"
36 #include "vtkPolyDataMapper.h"
37 #include "vtkInteractorObserver.h"
38 #include "vtkInteractorStyleImage.h"
39 #include <vtkKochanekSpline.h>
41 #include <vtkCellPicker.h>
42 #include <vtkCamera.h>
43 #include <vtkPolyLine.h>
44 #include <vtkDataSetMapper.h>
45 #include <vtkUnstructuredGrid.h>
47 #include "creawxVTKRenderWindowInteractor.h"
50 #include "wxVtkBaseView.h"
53 //--------------------------------------------------------
55 class manualViewPoint{
58 manualViewPoint(wxVtkBaseView *wxvtkbaseview);
59 virtual ~manualViewPoint();
61 virtual manualViewPoint * Clone();
62 void CopyAttributesTo( manualViewPoint *cloneObject );
63 void SetSelected(bool selected);
64 void SetPosibleSelected(bool posibleSelected);
66 bool GetPosibleSelected();
67 void DeleteVtkObjects();
68 vtkActor* CreateVtkPointActor();
71 // Sets the x,y,z position to the actual point. Establishes a range of the points respect
72 // to the final coordinate.
76 // @param range - double
78 void SetPositionXY(double x, double y, double range, double posZ);
81 // Get ViewPoint VtkActor
84 vtkActor* GetVtkActor();
87 // Updates the color and width of the actual point if the VTK Actor has been created
89 void UpdateColorActor();
92 // Updates the point normal color of the actual point.
94 void UpdateColorActor(double nR, double nG, double nB);
96 void GetSpacing(double spc[3]);
97 void SetSpacing(double spc[3]);
98 void SetWidthLine( double width);
107 bool _posibleSelected;
112 // Point VTK PolyData object
119 vtkActor *_pointVtkActor;
122 // Point VTK PolyData mapper
124 vtkPolyDataMapper *_bboxMapper;
127 // Reference to VtkBaseView
129 wxVtkBaseView *_wxvtkbaseview;
132 // Line Width (def=1)
138 // Point spacing (def=1)
142 // Point normal color
143 double _colorNormal_r;
144 double _colorNormal_g;
145 double _colorNormal_b;
147 // Posible selected point color
148 double _colorPosibleSelected_r;
149 double _colorPosibleSelected_g;
150 double _colorPosibleSelected_b;
153 #endif // manualViewPoint_h