22 #include "vtkCamera.h"
41 for (; rendererIterator != end; ++rendererIterator)
43 std::string rendererName = (*rendererIterator).second->GetName();
46 (*rendererIterator).second->GetSliceNavigationController()->GetDefaultViewDirection();
57 <<
"=\"" << (*rendererIterator).second->GetSize()[2] <<
"\" ";
65 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[0] <<
"\" "
67 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[1] <<
"\" "
69 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[2] <<
"\" "
71 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[0] <<
"\" "
73 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[1] <<
"\" "
75 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[2] <<
"\" "
77 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[0] <<
"\" "
79 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[1] <<
"\" "
81 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[2] <<
"\" ";
122 if (m_FileStream.is_open())
124 m_FileStream.flush();
125 m_FileStream.close();
131 if (m_FileStream.is_open())
142 if (m_FileName ==
"")
144 MITK_ERROR <<
"EventRecorder::StartRecording - Filename needs to be set first.";
147 if (m_FileStream.is_open())
149 MITK_ERROR <<
"EventRecorder::StartRecording - Still recording. Stop recording before starting it again.";
153 m_FileStream.open(m_FileName.c_str(), std::ofstream::out);
154 if (!m_FileStream.good())
156 MITK_ERROR <<
"File " << m_FileName <<
" could not be opened!";
157 m_FileStream.close();
180 if (m_FileStream.is_open())
187 m_FileStream.flush();
188 m_FileStream.close();
static const std::string xmlCameraPositionZ()
static void WriteEventXMLInteractionsOpen(std::ofstream &stream)
static std::string EventToXML(InteractionEvent *event)
EventToXML Transforms an event into a XML tag describing it.
static const std::string xmlViewUpX()
static void WriteEventXMLInteractionsClose(std::ofstream &stream)
static const std::string xmlEventPropertyRendererName()
static void WriteEventXMLConfig(std::ofstream &stream)
static const std::string xmlTagConfigRoot()
static const std::string xmlTagInteractions()
static const std::string xmlEventPropertyMapperID()
static void WriteEventXMLEventsOpen(std::ofstream &stream)
static void WriteEventXMLClose(std::ofstream &stream)
static const std::string xmlCameraFocalPointZ()
static const std::string xmlCameraFocalPointX()
static const std::string xmlCameraFocalPointY()
static const std::string xmlRenderSizeX()
int MapperSlotId
MapperSlotId defines which kind of mapper (e.g., 2D or 3D) shoud be used.
static const std::string xmlRenderSizeY()
static BaseRendererMapType baseRendererMap
void SetEventIgnoreList(std::vector< std::string > list)
SetEventIgnoreList Optional. Provide a list of strings that describe which events are to be ignored...
static const std::string xmlEventPropertyViewDirection()
static void WriteEventXMLEventsClose(std::ofstream &stream)
static const std::string xmlTagRenderer()
static const std::string xmlTagEvents()
static const std::string xmlViewUpY()
static const std::string xmlCameraPositionX()
static const std::string xmlHead()
static const std::string xmlCameraPositionY()
static const std::string xmlRenderSizeZ()
virtual void Notify(InteractionEvent *interactionEvent, bool) override
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...
static const std::string xmlViewUpZ()
static void WriteEventXMLHeader(std::ofstream &stream)