MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSNavigationExperimentLogging.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkUSNavigationExperimentLogging_h
14#define mitkUSNavigationExperimentLogging_h
15
16#include <mitkCommon.h>
17#include <itkObjectFactory.h>
18#include <Poco/DOM/AutoPtr.h>
19#include <ostream>
20
21namespace itk {
22template<class T> class SmartPointer;
23class RealTimeClock;
24}
25
26namespace mitk {
27class DataNode;
28}
29
30namespace Poco {
31namespace XML {
32class Document;
33class Element;
34}
35}
36
37namespace mitk {
41class USNavigationExperimentLogging : public itk::Object {
42public:
45
55 void Reset();
56
60 void SetFileName(const std::string& fileName);
61
73 void SetResult(const itk::SmartPointer<mitk::DataNode> resultNode);
74
78 itkSetMacro(KeyPrefix, std::string);
79 itkGetMacro(KeyPrefix, std::string);
80
81protected:
87
88 void AddCurrentTimeAttributes(Poco::AutoPtr<Poco::XML::Element>);
89
93 void WriteXmlToFile();
94
95 std::string m_KeyPrefix;
96
97 std::string m_FileName;
99
102
103 Poco::AutoPtr<Poco::XML::Document> m_OutputXML;
104 Poco::AutoPtr<Poco::XML::Element> m_OutputXMLRoot;
105};
106} // namespace mitk
107
108#endif
Logs data node properties to an XML file.
itkSetMacro(KeyPrefix, std::string)
Only properties with this prefix are written into the output file.
void SetResult(const itk::SmartPointer< mitk::DataNode > resultNode)
The properties of the given node are appended to the XML tree. The data node gets its own XML node un...
itkGetMacro(KeyPrefix, std::string)
Poco::AutoPtr< Poco::XML::Document > m_OutputXML
void WriteXmlToFile()
Does the actual writing of the complete XML tree to the file system.
void SetFileName(const std::string &fileName)
Setter for the file path and name of the XML file.
USNavigationExperimentLogging()
Constructs an empty XML tree and starts the real time clock.
itkNewMacro(USNavigationExperimentLogging)
void Reset()
Clears the XML tree. Can be used to start logging a new experiment. Make sure that the output file na...
void AddCurrentTimeAttributes(Poco::AutoPtr< Poco::XML::Element >)
Poco::AutoPtr< Poco::XML::Element > m_OutputXMLRoot
mitkClassMacroItkParent(USNavigationExperimentLogging, itk::Object)
itk::SmartPointer< itk::RealTimeClock > m_RealTimeClock
IGT Exceptions.