18 #include "vtkCamera.h" 37 for (; rendererIterator != end; ++rendererIterator)
39 std::string rendererName = (*rendererIterator).second->GetName();
42 (*rendererIterator).second->GetSliceNavigationController()->GetDefaultViewDirection();
53 <<
"=\"" << (*rendererIterator).second->GetSize()[2] <<
"\" ";
61 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[0] <<
"\" " 63 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[1] <<
"\" " 65 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetViewUp()[2] <<
"\" " 67 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[0] <<
"\" " 69 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[1] <<
"\" " 71 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetFocalPoint()[2] <<
"\" " 73 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[0] <<
"\" " 75 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[1] <<
"\" " 77 << (*rendererIterator).second->GetVtkRenderer()->GetActiveCamera()->GetPosition()[2] <<
"\" ";
118 if (m_FileStream.is_open())
120 m_FileStream.flush();
121 m_FileStream.close();
127 if (m_FileStream.is_open())
138 if (m_FileName ==
"")
140 MITK_ERROR <<
"EventRecorder::StartRecording - Filename needs to be set first.";
143 if (m_FileStream.is_open())
145 MITK_ERROR <<
"EventRecorder::StartRecording - Still recording. Stop recording before starting it again.";
149 m_FileStream.open(m_FileName.c_str(), std::ofstream::out);
150 if (!m_FileStream.good())
152 MITK_ERROR <<
"File " << m_FileName <<
" could not be opened!";
153 m_FileStream.close();
176 if (m_FileStream.is_open())
183 m_FileStream.flush();
184 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) should be used.
static const std::string xmlRenderSizeY()
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...
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()
~EventRecorder() override
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()
void Notify(InteractionEvent *interactionEvent, bool) override
static const std::string xmlViewUpZ()
static void WriteEventXMLHeader(std::ofstream &stream)