COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coVtk.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef VTK2COVISE_H
9 #define VTK2COVISE_H
10 
11 class vtkDataSet;
12 class vtkDataObject;
13 class vtkDataArray;
14 class vtkInformation;
15 class vtkImageData;
16 
17 #include <util/coExport.h>
18 #include <do/coDistributedObject.h>
19 #include <string>
20 #include <vector>
21 
22 namespace covise
23 {
24 
25 class coDoAbstractData;
26 class coDoAbstractStructuredGrid;
27 class coDoGeometry;
28 class coDoPixelImage;
29 class coDoGrid;
30 
32 {
33 public:
35  {
36  Scalars = 0,
37  Vectors = 1,
38  Normals = 2,
39  TexCoords = 3,
40  Tensors = 4
41  };
42 
43  enum Flags
44  {
45  None = 0,
46  Normalize = 1,
47  RequireDouble = 2
48  };
49 
50  static coDoGeometry *vtk2Covise(const coObjInfo &info, vtkDataSet *vtk);
51  static coDoGrid *vtkGrid2Covise(const coObjInfo &info, vtkDataSet *vtk);
52  static coDoAbstractData *vtkData2Covise(const coObjInfo &info, vtkDataSet *vtk, int attribute, const char *name = NULL, const coDoAbstractStructuredGrid *sgrid = NULL);
53  static coDoPixelImage *vtkImage2Covise(const coObjInfo &info, vtkImageData *vtk);
54 
55  static vtkDataObject *covise2Vtk(const coDistributedObject *geo,
56  const std::vector<const coDistributedObject *> &fields,
57  const coDistributedObject *normals);
58  static vtkDataSet *covise2Vtk(const coDistributedObject *obj);
59  static vtkDataSet *coviseGeometry2Vtk(const coDoGeometry *geo);
60  static vtkDataSet *coviseGrid2Vtk(const coDoGrid *grid);
61  static vtkDataArray *coviseData2Vtk(const coDoGrid *grid, const coDoAbstractData *data, Flags flags = None);
62 
63  static bool isPortRequired(vtkInformation *info);
64  static std::string inPortTypeList(vtkInformation *info);
65  static std::string outPortTypeList(vtkInformation *info);
66 };
67 }
68 
69 #endif
GLsizei GLsizei GLuint * obj
Definition: khronos-glext.h:6733
Definition: coDoGrid.h:16
GLuint const GLchar * name
Definition: khronos-glext.h:6722
Attributes
Definition: coVtk.h:34
Flags
Definition: coVtk.h:43
#define NULL
Definition: covise_list.h:22
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
Definition: coDoAbstractStructuredGrid.h:53
Definition: coObjID.h:230
Definition: coVtk.h:31
#define ALGEXPORT
Definition: coExport.h:313
Definition: coDoData.h:58
Definition: coDistributedObject.h:295
Definition: coDoGeometry.h:46
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
Definition: coDoPixelImage.h:34
GLbitfield flags
Definition: khronos-glext.h:7879