MCPcopy Create free account
hub / github.com/MITK/MITK / StartRecording

Method StartRecording

Modules/Core/src/Interactions/mitkEventRecorder.cpp:136–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void mitk::EventRecorder::StartRecording()
137{
138 if (m_FileName == "")
139 {
140 MITK_ERROR << "EventRecorder::StartRecording - Filename needs to be set first.";
141 return;
142 }
143 if (m_FileStream.is_open())
144 {
145 MITK_ERROR << "EventRecorder::StartRecording - Still recording. Stop recording before starting it again.";
146 return;
147 }
148
149 m_FileStream.open(m_FileName.c_str(), std::ofstream::out);
150 if (!m_FileStream.good())
151 {
152 MITK_ERROR << "File " << m_FileName << " could not be opened!";
153 m_FileStream.close();
154 return;
155 }
156
157 m_Active = true;
158
159 // write head and config
160 // <?xml version="1.0"?>
161 // <interactions>
162 // <config>
163 // <renderer RendererName="stdmulti.widget1" ViewDirection="1"/>
164 // <renderer RendererName="stdmulti.widget0" ViewDirection="0"/>
165 // ...
166 // </config>
167 // <events>
168 WriteEventXMLHeader(m_FileStream);
169 WriteEventXMLInteractionsOpen(m_FileStream);
170 WriteEventXMLConfig(m_FileStream);
171 WriteEventXMLEventsOpen(m_FileStream);
172}
173
174void mitk::EventRecorder::StopRecording()
175{

Callers

nothing calls this directly

Calls 6

WriteEventXMLHeaderFunction · 0.85
WriteEventXMLConfigFunction · 0.85
WriteEventXMLEventsOpenFunction · 0.85
closeMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected