DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
VTKViewer.h
Go to the documentation of this file.
1 // VTK Viewer
2 // Written 2012 Hal Canary <http://cs.unc.edu/~hal>
3 // Copyright 2012 University of North Carolina at Chapel Hill.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License"); you
6 // may not use this file except in compliance with the License. You
7 // may obtain a copy of the License at
8 //
9 // LICENSE.md in this repository or
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 // implied. See the License for the specific language governing
16 // permissions and limitations under the License.
17 #ifndef VTKVIEWER_H
18 #define VTKVIEWER_H
19 #include <cassert>
20 #include <QTimer>
21 #include <QVTKWidget.h>
22 #include <vtkRenderer.h>
23 #include <vtkSmartPointer.h>
24 class vtkPolyData;
25 
26 class VTKViewer : public QVTKWidget {
27  Q_OBJECT;
28 public:
29  VTKViewer();
30  void add(vtkPolyData * polyData);
31  void add(const char * file_name);
32 public slots:
33  void rotate();
34  void toggleRotate();
35  void toggleStereo();
36  void setStereoType(int vtkStereoType);
37  void nextStereoType();
38  void screenshot();
39  void setsize(double s1, double s2);
40 private:
41  QTimer m_timer;
42  vtkSmartPointer < vtkRenderer > m_renderer;
43 
44  double m_size[2];
45 };
46 
47 #endif /* VTKVIEWER_H */
void nextStereoType()
Definition: VTKViewer.cxx:377
void toggleStereo()
Definition: VTKViewer.cxx:369
void add(vtkPolyData *polyData)
Definition: VTKViewer.cxx:255
vtkSmartPointer< vtkRenderer > m_renderer
Definition: VTKViewer.h:42
QTimer m_timer
Definition: VTKViewer.h:41
void screenshot()
Definition: VTKViewer.cxx:399
void rotate()
Definition: VTKViewer.cxx:354
void setsize(double s1, double s2)
Definition: VTKViewer.cxx:249
double m_size[2]
Definition: VTKViewer.h:44
void toggleRotate()
Definition: VTKViewer.cxx:346
void setStereoType(int vtkStereoType)
Definition: VTKViewer.cxx:362