17#ifndef __albaRWIBase_H__
18#define __albaRWIBase_H__
26#include "vtkRenderWindowInteractor.h"
36class vtkInteractorObserver;
41class vtkWindowToImageFilter;
46#define ID_albaRWIBase_TIMER 1001
60class ALBA_EXPORT
albaRWIBase :
public wxWindow,
public vtkRenderWindowInteractor
72 albaRWIBase(wxWindow *parent, wxWindowID
id,
const wxPoint &pos = wxDefaultPosition,
73 const wxSize &size = wxDefaultSize,
long style = wxWANTS_CHARS ,
const wxString &name = wxPanelNameStr);
205 DECLARE_EVENT_TABLE()
Interface implementing the Observer of the Subject/Observer design pattern.
albaRWIBase is a vtkRenderWindowInteractor placed on a wxWindow
void Start()
Redefined method to take the control on event loop.
albaRWIBase(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxWANTS_CHARS, const wxString &name=wxPanelNameStr)
void OnEraseBackground(wxEraseEvent &event)
int m_StereoMovieFrameCounter
vtkPNGWriter * m_StereoMoviewFrameWriter
vtkImageAppend * m_StereoImage
virtual void OnKeyDown(wxKeyEvent &event)
Send an event with key code information.
void Initialize()
Initialize the render window interactor.
void SetInteractorStyle(vtkInteractorObserver *o)
Redefined to set the m_CustomInteractorStyle flag.
bool m_StereoFrameGenerate
void OnPaint(wxPaintEvent &event)
Method called whe the render window as to be repainted.
virtual void OnRightMouseButtonUp(wxMouseEvent &event)
Release the mouse and send an event with mouse position.
virtual void OnMouseWheel(wxMouseEvent &event)
Send an event with mouse wheel.
albaObserver * m_Listener
void RecursiveSaving(albaString filename="", albaViewCompound *v=NULL, int magnification=1)
virtual void OnLeftMouseDoubleClick(wxMouseEvent &event)
Capture left mouse double click and notify it.
virtual void OnRightMouseButtonDown(wxMouseEvent &event)
Capture mouse and notify the mouse click.
virtual void OnMiddleMouseButtonDown(wxMouseEvent &event)
Capture mouse and notify the mouse click.
virtual void OnMiddleMouseButtonUp(wxMouseEvent &event)
Release the mouse and send an event with mouse position.
void SetStereoMovieDirectory(const char *dir)
Set the directory for the Stereo Movie.
int CreateTimer(int timertype)
virtual void OnLeftMouseButtonUp(wxMouseEvent &event)
Release the mouse and send an event with mouse position.
void Enable()
Enable the render window interactor.
virtual void OnTimer(wxTimerEvent &event)
Send an event with timer information.
void SaveImageRecursive(albaString filename="", albaViewCompound *v=NULL, int magnification=1)
Save all images of a view compound creating a view for every subview.
albaString m_StereoMovieDir
void GenerateStereoFrames()
Generate stereo frames for movie.
vtkCamera * GetCamera()
Return the current used camera.
void SetListener(albaObserver *listener)
void SaveAllImages(albaString filename="", albaViewCompound *v=NULL)
Save all images of the compound view.
vtkWindowToImageFilter * m_StereoMovieRightEye
virtual void OnSize(wxSizeEvent &event)
Find the current camera and set UseHorizontalViewAngle depending on the win aspect ratio.
virtual void OnLeftMouseButtonDown(wxMouseEvent &event)
Capture mouse and notify the mouse click.
void Disable()
Disable the render window interactor.
albaDeviceButtonsPadMouse * m_Mouse
vtkTypeMacro(albaRWIBase, vtkRenderWindowInteractor)
void UpdateSize(int x, int y)
Update the size of the render window.
void NotifyClick()
Notify mouse click on a view.
void SetMouse(albaDeviceButtonsPadMouse *mouse)
set the mouse device to which forward events from the view
wxBitmap * GetImage(int magnification=1)
Return an image of the render window.
vtkWindowToImageFilter * m_StereoMovieLeftEye
virtual void OnKeyUp(wxKeyEvent &event)
Send an event with key code information.
bool m_CustomInteractorStyle
virtual void OnMouseMotion(wxMouseEvent &event)
Send an event with mouse position.
void EnableStereoMovie(bool enable=true)
Enable/disable stereo movie frames generation.
virtual void OnChar(wxKeyEvent &event)
Send an event with key code information.
virtual void OnIdle(wxIdleEvent &event)
Do nothing.
void TerminateApp()
Redefined method to terminate the application.
virtual void OnMouseCaptureLost(wxMouseCaptureLostEvent &WXUNUSED(evt))
Manage Mouse Capture Lost.
void SaveImage(albaString filename="", int magnification=1)
Save an image of the render window.
static albaRWIBase * New()
albaString - performs common string operations on c-strings.
albaViewCompound is the base class for Compound Views in ALBA.