Evita  0.16
evVisualizer.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evVisualizer_h
25 #define __evVisualizer_h
26 
27 
28 #include "evProcessObject.h"
29 #include "evDataset.h"
31 #include "evGUIVisualizerWindow.h"
32 
33 #include "vtkCellPicker.h"
34 #include "vtkWindowToImageFilter.h"
35 #include "vtkPNMWriter.h"
36 #include "vtkRenderer.h"
37 
38 #include <sys/time.h>
39 
40 
41 // 07-may-2016
42 //class evInteractorStyle;
43 
44 
46 {
47 public:
48  evVisualizer(void);
49  virtual ~evVisualizer(void);
50 
51  virtual const evString GetClassName(void) const
52  {
53  return(evString("evVisualizer"));
54  }
55 
56  virtual int Setup(evGUIVisualizerWindow &visualizer_window);
57  virtual int SetupProp(evROI *roi, const unsigned int component);
58  virtual void ResetCamera(void);
59  virtual int SetRenderBuffer(evROI *roi, const unsigned int component);
60  virtual int Render(void);
61 
63  void SetController(evMultiProcessController *controller);
64 
65  virtual void SelectROI(const int window_x, const int window_y);
66 
67  void DeactivateROI(evROI *roi);
68 
69  int SetOutputImage(const evString &filename);
70 
71 protected:
72  QccIMGImageSequence *ImageSequence;
73  unsigned int NumDimensions;
75  double Max;
76  double Min;
77 
79  vtkRenderer *Renderer;
80 // 07-may-2016
81 // evInteractorStyle *InteractorStyle;
82  vtkCellPicker *Picker;
84 
85  virtual int PickROI(const int window_x, const int window_y,
86  unsigned int &roi_number);
87 
88  int DumpImage(void);
89 
90  static void ViewFrustumCallback(vtkObject *caller,
91  unsigned long event,
92  void *client_data,
93  void *call_data);
94 
95  private:
96  vtkWindowToImageFilter *WindowToImageFilter;
97  vtkPNMWriter *ImageWriter;
98  struct timeval PreviousFrameTimeStamp;
101 
102  static void PropCallback(vtkObject *caller,
103  unsigned long event,
104  void *client_data,
105  void *call_data);
106  static void PropCallbackDataDelete(void *client_data);
107 };
108 
109 
110 inline void evVisualizer::ResetCamera(void)
111 {
112  this->Renderer->ResetCamera();
113 }
114 
115 
117 {
118  return(this->Controller);
119 }
120 
121 
123 {
124  this->Controller = controller;
125 }
126 
127 
128 #endif
virtual void SelectROI(const int window_x, const int window_y)
void SetController(evMultiProcessController *controller)
Definition: evVisualizer.h:122
virtual int SetupProp(evROI *roi, const unsigned int component)
int SetOutputImage(const evString &filename)
virtual ~evVisualizer(void)
static void ViewFrustumCallback(vtkObject *caller, unsigned long event, void *client_data, void *call_data)
struct timeval PreviousFrameTimeStamp
Definition: evVisualizer.h:98
virtual int Setup(evGUIVisualizerWindow &visualizer_window)
double RenderFrameRate
Definition: evVisualizer.h:99
evGUIVisualizerWindow * VisualizerWindow
Definition: evVisualizer.h:78
int DumpImage(void)
Definition: evAddress.h:37
vtkWindowToImageFilter * WindowToImageFilter
Definition: evVisualizer.h:96
vtkCellPicker * Picker
Definition: evVisualizer.h:82
evAddress * Size
Definition: evVisualizer.h:74
virtual int PickROI(const int window_x, const int window_y, unsigned int &roi_number)
evMultiProcessController * Controller
Definition: evVisualizer.h:83
void DeactivateROI(evROI *roi)
double ImageSequenceFrameRate
Definition: evVisualizer.h:100
double Max
Definition: evVisualizer.h:75
Definition: evMultiProcessController.h:122
virtual void ResetCamera(void)
Definition: evVisualizer.h:110
evVisualizer(void)
Definition: evVisualizer.h:45
Definition: evGUIVisualizerWindow.h:39
virtual int SetRenderBuffer(evROI *roi, const unsigned int component)
evMultiProcessController * GetController(void) const
Definition: evVisualizer.h:116
virtual int Render(void)
QccIMGImageSequence * ImageSequence
Definition: evVisualizer.h:72
virtual const evString GetClassName(void) const
Definition: evVisualizer.h:51
unsigned int NumDimensions
Definition: evVisualizer.h:73
vtkPNMWriter * ImageWriter
Definition: evVisualizer.h:97
Definition: evProcessObject.h:31
Definition: evROI.h:40
double Min
Definition: evVisualizer.h:76
Definition: evString.h:30
static void PropCallback(vtkObject *caller, unsigned long event, void *client_data, void *call_data)
vtkRenderer * Renderer
Definition: evVisualizer.h:79
static void PropCallbackDataDelete(void *client_data)