00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-02-10 18:08:54 +0100 (Di, 10 Feb 2009) $ 00006 Version: $Revision: 16228 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKNavigationDataSequentialPlayer_H_HEADER_INCLUDED_ 00020 #define MITKNavigationDataSequentialPlayer_H_HEADER_INCLUDED_ 00021 00022 #include <mitkNavigationDataSource.h> 00023 #include "tinyxml.h" 00024 00025 00026 namespace mitk 00027 { 00028 00036 class MitkIGT_EXPORT NavigationDataSequentialPlayer 00037 : public NavigationDataSource 00038 { 00039 public: 00040 mitkClassMacro(NavigationDataSequentialPlayer, NavigationDataSource); 00041 itkNewMacro(Self); 00042 00046 void SetFileName(const std::string& _FileName); 00047 00051 itkGetStringMacro(FileName); 00052 00056 void SetXMLString(const std::string& _XMLString); 00057 00061 itkGetStringMacro(XMLString); 00062 00066 itkSetMacro(Repeat, bool); 00070 itkGetMacro(Repeat, bool); 00074 itkGetMacro(NumberOfSnapshots, unsigned int); 00075 00082 void GoToSnapshot(int i); 00083 00088 virtual void UpdateOutputInformation(); 00089 00090 protected: 00091 NavigationDataSequentialPlayer(); 00092 virtual ~NavigationDataSequentialPlayer(); 00093 void ReinitXML(); 00094 mitk::NavigationData::Pointer ReadVersion1(); 00098 virtual void GenerateData(); 00099 00100 std::string m_FileName; 00101 std::string m_XMLString; 00102 TiXmlDocument* m_Doc; 00103 TiXmlElement* m_DataElem; 00104 TiXmlElement* m_CurrentElem; 00105 bool m_Repeat; 00106 unsigned int m_NumberOfSnapshots; 00107 int m_LastGoTo; 00108 }; 00109 } // namespace mitk 00110 00111 #endif /* MITKNavigationDataSequentialPlayer_H_HEADER_INCLUDED_ */