15 #ifndef niftkVLSceneView_h
16 #define niftkVLSceneView_h
18 #include <niftkVLExports.h>
21 #include <vlGraphics/UIEventListener.hpp>
22 #include <mitkDataStorage.h>
23 #include <mitkDataNode.h>
24 #include <mitkImage.h>
31 class CoordinateAxesData;
83 void setDataStorage(mitk::DataStorage* ds);
88 bool setCameraTrackingNode(
const mitk::DataNode* node);
93 void setEyeHandFileName(
const std::string& fileName);
98 bool setBackgroundNode(
const mitk::DataNode* node);
103 void setRenderingMode( vl::Vivid::ERenderingMode );
104 vl::Vivid::ERenderingMode renderingMode()
const;
109 void setBackgroundColor(
float r,
float g,
float b);
110 vl::vec3 backgroundColor()
const;
115 void setStencilEnabled(
bool enabled );
116 bool isStencilEnabled()
const;
121 void setStencilBackgroundColor(
const vl::vec4&
color );
122 const vl::vec4& stencilBackgroundColor()
const;
127 void setStencilSmoothness(
float smoothness );
128 float stencilSmoothness()
const;
133 void setOpacity(
float opacity );
134 float opacity()
const;
141 void setDepthPeelingPasses(
int n );
142 int depthPeelingPasses()
const;
147 void reInit(
const vl::vec3& dir = vl::vec3(0,0,1),
const vl::vec3& up = vl::vec3(0,1,0),
float bias=1.0
f);
152 void globalReInit(
const vl::vec3& dir = vl::vec3(0,0,1),
const vl::vec3& up = vl::vec3(0,1,0),
float bias=1.0
f);
158 const vl::VividRendering*
vividRendering()
const {
return m_VividRendering.get(); }
169 vl::CalibratedCamera*
camera() {
return m_Camera.get(); }
170 const vl::CalibratedCamera*
camera()
const {
return m_Camera.get(); }
175 mitk::DataStorage*
dataStorage() {
return m_DataStorage.GetPointer(); }
176 const mitk::DataStorage*
dataStorage()
const {
return m_DataStorage.GetPointer(); }
181 void scheduleSceneRebuild();
184 void initSceneFromDataStorage();
188 void addDataStorageListeners();
189 void removeDataStorageListeners();
190 void scheduleTrackballAdjustView(
bool schedule =
true);
193 void scheduleNodeAdd(
const mitk::DataNode* node);
196 void scheduleNodeRemove(
const mitk::DataNode* node);
199 void scheduleNodeUpdate(
const mitk::DataNode* node);
202 void addDataNode(
const mitk::DataNode* node);
205 void removeDataNode(
const mitk::DataNode* node);
208 void updateDataNode(
const mitk::DataNode* node);
211 void updateCameraParameters();
214 VLMapper* getVLMapper(
const mitk::DataNode* node);
248 niftk::CUDAImage::ConstPointer m_BackgroundCUDAImage;
249 CudaTest* m_CudaTest;
256 virtual void initEvent();
258 virtual void updateEvent();
259 virtual void destroyEvent();
vl::VividRendering * vividRendering()
Definition: niftkVLSceneView.h:157
Definition: niftkVLTrackballManipulator.h:28
mitk::DataNode::ConstPointer m_BackgroundNode
Definition: niftkVLSceneView.h:237
virtual void keyPressEvent(unsigned short, vl::EKey)
Definition: niftkVLSceneView.h:269
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2537
virtual void mouseWheelEvent(int)
Definition: niftkVLSceneView.h:268
virtual void addedListenerEvent(vl::OpenGLContext *)
Definition: niftkVLSceneView.h:261
bool m_ScheduleInitScene
Definition: niftkVLSceneView.h:242
Definition: ReceptorMemberCommandTest.cxx:25
vl::ref< vl::VividRendering > m_VividRendering
Definition: niftkVLSceneView.h:220
GLboolean GLboolean g
Definition: glew.h:8272
vl::ref< vl::CalibratedCamera > m_Camera
Definition: niftkVLSceneView.h:223
std::map< mitk::DataNode::ConstPointer, vl::ref< VLMapper > > DataNodeVLMapperMapType
Definition: niftkVLSceneView.h:73
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
virtual void mouseUpEvent(vl::EMouseButton, int, int)
Definition: niftkVLSceneView.h:266
bool m_ScheduleTrackballAdjustView
Definition: niftkVLSceneView.h:241
virtual void removedListenerEvent(vl::OpenGLContext *)
Definition: niftkVLSceneView.h:262
vl::CalibratedCamera * camera()
Definition: niftkVLSceneView.h:169
GLfloat bias
Definition: glew.h:9069
virtual void mouseMoveEvent(int, int)
Definition: niftkVLSceneView.h:265
const niftk::VLTrackballManipulator * trackball() const
Definition: niftkVLSceneView.h:164
vl::ref< vl::SceneManagerActorTree > m_SceneManager
Definition: niftkVLSceneView.h:222
A vl::UIEventListener bound to a QGLWidget (niftk::VLWidget) managing all VL/Vivid rendering and opti...
Definition: niftkVLSceneView.h:70
DataNodePropertyListener::Pointer m_NodeColorPropertyListener
Definition: niftkVLSceneView.h:228
A VL representation of a mitk::DataNode for rendering purposes.
Definition: niftkVLMapper.h:65
DataNodeVLMapperMapType m_DataNodeVLMapperMap
Definition: niftkVLSceneView.h:231
mitk::DataStorage * dataStorage()
Definition: niftkVLSceneView.h:175
GLuint color
Definition: glew.h:6687
const vl::VividRendering * vividRendering() const
Definition: niftkVLSceneView.h:158
const vl::CalibratedCamera * camera() const
Definition: niftkVLSceneView.h:170
mitk::Image::ConstPointer m_BackgroundImage
Definition: niftkVLSceneView.h:238
niftk::VLTrackballManipulator * trackball()
Definition: niftkVLSceneView.h:163
virtual void fileDroppedEvent(const std::vector< vl::String > &)
Definition: niftkVLSceneView.h:271
vl::mat4 m_EyeHandMatrix
Definition: niftkVLSceneView.h:239
std::set< mitk::DataNode::ConstPointer > m_NodesToAdd
Definition: niftkVLSceneView.h:233
vl::ref< vl::VividRenderer > m_VividRenderer
Definition: niftkVLSceneView.h:221
GLdouble GLdouble GLdouble r
Definition: glew.h:1390
DataNodePropertyListener::Pointer m_NodeVisibilityListener
Definition: niftkVLSceneView.h:227
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1236
std::set< mitk::DataNode::ConstPointer > m_NodesToUpdate
Definition: niftkVLSceneView.h:232
bool m_RenderingInProgressGuard
Definition: niftkVLSceneView.h:243
GLclampd n
Definition: glew.h:6789
mitk::DataStorage::Pointer m_DataStorage
Definition: niftkVLSceneView.h:226
virtual void visibilityEvent(bool)
Definition: niftkVLSceneView.h:264
VLWidget * m_VLWidget
Definition: niftkVLSceneView.h:218
virtual void mouseDownEvent(vl::EMouseButton, int, int)
Definition: niftkVLSceneView.h:267
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1236
std::set< mitk::DataNode::ConstPointer > m_NodesToRemove
Definition: niftkVLSceneView.h:234
vl::ref< niftk::VLTrackballManipulator > m_Trackball
Definition: niftkVLSceneView.h:224
DataNodePropertyListener::Pointer m_NodeOpacityPropertyListener
Definition: niftkVLSceneView.h:229
const mitk::DataStorage * dataStorage() const
Definition: niftkVLSceneView.h:176
virtual void keyReleaseEvent(unsigned short, vl::EKey)
Definition: niftkVLSceneView.h:270
mitk::DataNode::ConstPointer m_CameraNode
Definition: niftkVLSceneView.h:235
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194
virtual void enableEvent(bool)
Definition: niftkVLSceneView.h:263
GLclampf f
Definition: glew.h:3136