7 #ifndef __vtkPlusConfig_h 8 #define __vtkPlusConfig_h 10 #include "PlusConfigure.h" 11 #include "vtkPlusCommonExport.h" 13 #include "vtkObject.h" 14 #include "vtkXMLDataElement.h" 17 class vtkIGSIORecursiveCriticalSection;
45 PlusStatus SaveApplicationConfigurationToFile();
50 std::string GetApplicationConfigurationFilePath()
const;
56 std::string GetNewDeviceSetConfigurationFileName();
66 PlusStatus WriteTransformToCoordinateDefinition(
const char* aFromCoordinateFrame,
const char* aToCoordinateFrame, vtkMatrix4x4* aMatrix,
double aError = -1,
const char* aDate = NULL);
76 PlusStatus ReadTransformToCoordinateDefinition(
const char* aFromCoordinateFrame,
const char* aToCoordinateFrame, vtkMatrix4x4* aMatrix,
double* aError = NULL, std::string* aDate = NULL);
86 PlusStatus ReadTransformToCoordinateDefinition(vtkXMLDataElement* aDeviceSetConfigRootElement,
const char* aFromCoordinateFrame,
const char* aToCoordinateFrame, vtkMatrix4x4* aMatrix,
double* aError = NULL, std::string* aDate = NULL);
94 PlusStatus ReplaceElementInDeviceSetConfiguration(
const char* aElementName, vtkXMLDataElement* aNewRootElement);
105 vtkXMLDataElement* LookupElementWithNameContainingChildWithNameAndAttribute(vtkXMLDataElement* aConfig,
const char* aElementName,
const char* aChildName,
const char* aChildAttributeName,
const char* aChildAttributeValue);
112 std::string GetFirstFileFoundInConfigurationDirectory(
const char* aFileName);
120 std::string GetFirstFileFoundInDirectory(
const char* aFileName,
const char* aDirectory);
125 void SetOutputDirectory(
const std::string& aDir);
128 void SetImageDirectory(
const std::string& aDir);
135 PlusStatus FindImagePath(
const std::string& aImagePath, std::string& aFoundAbsolutePath);
142 PlusStatus FindModelPath(
const std::string& aModelPath, std::string& aFoundAbsolutePath);
148 std::string GetModelPath(
const std::string& subPath);
154 std::string GetDeviceSetConfigurationPath(
const std::string& subPath);
157 std::string GetDeviceSetConfigurationFileName();
160 void SetDeviceSetConfigurationDirectory(
const std::string& aDir);
163 void SetDeviceSetConfigurationFileName(
const std::string& aFilePath);
169 vtkXMLDataElement* CreateDeviceSetConfigurationFromFile(
const std::string& aConfigFile);
174 std::string GetOutputPath(
const std::string& subPath);
179 std::string GetOutputDirectory();
184 std::string GetDeviceSetConfigurationDirectory();
189 std::string GetImageDirectory();
195 std::string GetImagePath(
const std::string& subPath);
201 std::string GetScriptPath(
const std::string& subPath);
204 vtkGetObjectMacro(DeviceSetConfigurationData, vtkXMLDataElement);
206 void SetDeviceSetConfigurationData(vtkXMLDataElement* deviceSetConfigurationData);
209 vtkGetStdStringMacro(EditorApplicationExecutable);
211 vtkSetStdStringMacro(EditorApplicationExecutable);
214 vtkGetStdStringMacro(ApplicationStartTimestamp);
220 std::string GetPlusExecutablePath(
const std::string& executableName);
227 std::string GetAbsolutePath(
const std::string& aPath,
const std::string& aBasePath);
231 void SetProgramDirectory();
234 vtkGetObjectMacro(ApplicationConfigurationData, vtkXMLDataElement);
236 vtkSetObjectMacro(ApplicationConfigurationData, vtkXMLDataElement);
257 std::string FindFileRecursivelyInDirectory(
const char* aFileName,
const char* aDirectory);
std::string ApplicationStartTimestamp
vtkXMLDataElement * DeviceSetConfigurationData
Singleton class providing tools needed for handling the configuration - finding files,...
vtkXMLDataElement * ApplicationConfigurationData
std::string EditorApplicationExecutable
std::string DeviceSetConfigurationFileName
std::string ModelDirectory
std::string OutputDirectory
std::string ProgramDirectory
std::string ScriptsDirectory
std::string DeviceSetConfigurationDirectory
std::string ImageDirectory