00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-08-11 15:15:02 +0200 (Di, 11 Aug 2009) $ 00006 Version: $Revision $ 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 #ifndef NAVIGATIONTOOLREADER_H_INCLUDED 00019 #define NAVIGATIONTOOLREADER_H_INCLUDED 00020 00021 //itk headers 00022 #include <itkObjectFactory.h> 00023 00024 //mitk headers 00025 #include <mitkCommon.h> 00026 #include "mitkNavigationTool.h" 00027 #include "mitkDataStorage.h" 00028 #include "mitkNavigationToolStorageDeserializer.h" 00029 #include <MitkIGTExports.h> 00030 00031 namespace mitk { 00039 class MitkIGT_EXPORT NavigationToolReader : public itk::Object 00040 { 00041 friend class mitk::NavigationToolStorageDeserializer; 00042 public: 00043 mitkClassMacro(NavigationToolReader,itk::Object); 00044 mitkNewMacro1Param(Self,mitk::DataStorage::Pointer); 00045 00053 mitk::NavigationTool::Pointer DoRead(std::string filename); 00054 00055 itkGetMacro(ErrorMessage,std::string); 00056 00057 protected: 00058 NavigationToolReader(mitk::DataStorage::Pointer dataStorage); 00059 ~NavigationToolReader(); 00060 00061 std::string m_ErrorMessage; 00062 00063 mitk::DataStorage::Pointer m_DataStorage; 00064 00065 mitk::NavigationTool::Pointer ConvertDataNodeToNavigationTool(mitk::DataNode::Pointer node, std::string toolPath); 00066 00067 //################### protected help methods ######################## 00068 std::string GetFileWithoutPath(std::string FileWithPath); 00069 00070 }; 00071 } // namespace mitk 00072 #endif //NAVIGATIONTOOLREADER