2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
28 #ifndef _VTKVECTORSTENSORSVISUBASE_H_
29 #define _VTKVECTORSTENSORSVISUBASE_H_
33 #include "vtkLookupTable.h"
34 #include "vtkPolyDataMapper.h"
35 #include "vtkRenderer.h"
36 #include "vtkSmartPointer.h"
37 #include "vtkVectorNorm.h"
40 //---------------------------------------------
41 // Class Name: vtkVectorsTensorsVisuBase
43 //---------------------------------------------
48 class /*VTK_COMMON_EXPORT*/ vtkLookupTableDirectionVector : public vtkScalarsToColors
52 // Construct with range=[0,1]; and hsv ranges set up for rainbow color table
53 // (from red to blue).
54 static vtkLookupTableDirectionVector *New();
56 vtkTypeMacro(vtkLookupTableDirectionVector,vtkScalarsToColors);
57 void PrintSelf(ostream& os, vtkIndent indent);
59 double *GetRange() { return this->GetTableRange(); };
60 void SetRange(double min, double max) { this->SetTableRange(min, max); };
61 void SetRange(double rng[2]) { this->SetRange(rng[0], rng[1]); };
63 void SetTableRange(double r[2]);
64 virtual void SetTableRange(double min, double max);
65 vtkGetVectorMacro(TableRange,double,2);
67 unsigned char *MapValue(double v);
69 void GetColor(double x, double rgb[3]);
71 void MapScalarsThroughTable2(void *input, unsigned char *output,
72 int inputDataType, int numberOfValues,
73 int inputIncrement, int outputIncrement);
79 vtkLookupTableDirectionVector(int sze=256, int ext=256);
80 ~vtkLookupTableDirectionVector();
84 vtkLookupTableDirectionVector(const vtkLookupTableDirectionVector&); // Not implemented.
85 void operator=(const vtkLookupTableDirectionVector&); // Not implemented.
101 class vtkVectorsTensorsVisuBase
104 //---------------------------------------------
105 //Methods and attributes exposed to other classes
106 //---------------------------------------------
108 vtkVectorsTensorsVisuBase();
109 ~vtkVectorsTensorsVisuBase();
111 void SetActive(bool);
112 void SetDataObject(vtkDataObject*);
113 void SetRenderer(vtkRenderer *);
114 void SetScaleFactor(double);
115 void SetOpacity(double);
116 void SetTypeForm(int);
117 void SetColorLaw(int);
118 void SetColor(std::vector<double>);
121 vtkDataObject* GetDataObject();
122 vtkRenderer* GetRenderer();
123 double GetScaleFactor();
125 vtkProp3D* GetProp3D();
128 virtual void Process();
129 void VisibilityActor();
133 //---------------------------------------------
134 //Methods and attributes exposed only to classes
135 //that are derived from this class
136 //---------------------------------------------
139 //---------------------------------------------
140 //Methods and attributes only visible by this class
141 //---------------------------------------------
147 vtkDataObject *_dataobject;
148 vtkRenderer *_renderer;
156 vtkSmartPointer<vtkPolyDataMapper> _pdm;
157 vtkSmartPointer<vtkActor> _actor;
158 vtkLookupTableDirectionVector *_LutEED;
160 double _colorR,_colorG,_colorB;
164 //-end of _VTKVECTORSTENSORSVISUBASE_H_------------------------------------------------------