18 #ifndef __vtkSlicerApplicationLogic_h 19 #define __vtkSlicerApplicationLogic_h 28 #include <vtkCollection.h> 31 #include <itkMultiThreader.h> 32 #include <itkMutexLock.h> 41 class ProcessingTaskQueue;
43 class ReadDataRequest;
45 class WriteDataRequest;
55 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
71 void PropagateFiducialListSelection();
74 void CreateProcessingThread();
77 void TerminateProcessingThread();
105 vtkMTimeType RequestModified(vtkObject *);
115 vtkMTimeType RequestReadFile(
const char *refNode,
const char *filename,
116 int displayData =
false,
int deleteFile =
false);
124 vtkMTimeType RequestUpdateParentTransform(
const std::string &updatedNode,
const std::string& parentTransformNode);
132 vtkMTimeType RequestUpdateSubjectHierarchyLocation(
const std::string &updatedNode,
const std::string& siblingNode);
137 unsigned int GetReadDataQueueSize();
145 vtkMTimeType RequestWriteData(
const char *refNode,
const char *filename);
157 vtkMTimeType RequestReadScene(
const std::string& filename,
158 std::vector<std::string> &targetIDs,
159 std::vector<std::string> &sourceIDs,
160 int displayData =
false,
161 int deleteFile =
false);
167 void ProcessModified();
173 void ProcessReadData();
176 void ProcessWriteData();
189 static bool IsEmbeddedModule(
const std::string& filePath,
const std::string& applicationHomeDir,
190 const std::string& slicerRevision);
196 static bool IsPluginInstalled(
const std::string& filePath,
const std::string& applicationHomeDir);
199 static bool IsPluginBuiltIn(
const std::string& filePath,
const std::string& applicationHomeDir);
202 static std::string GetModuleShareDirectory(
const std::string& moduleName,
const std::string& filePath);
205 static std::string GetModuleSlicerXYShareDirectory(
const std::string& filePath);
208 static std::string GetModuleSlicerXYLibDirectory(
const std::string& filePath);
220 static ITK_THREAD_RETURN_TYPE ProcessingThreaderCallback(
void * );
223 static ITK_THREAD_RETURN_TYPE NetworkingThreaderCallback(
void * );
226 void ProcessProcessingTasks();
229 void ProcessNetworkingTasks();
235 void ProcessReadSceneData( ReadDataRequest &req );
236 void ProcessWriteSceneData( WriteDataRequest &req );
242 itk::MultiThreader::Pointer ProcessingThreader;
243 itk::MutexLock::Pointer ProcessingThreadActiveLock;
244 itk::MutexLock::Pointer ProcessingTaskQueueLock;
245 itk::MutexLock::Pointer ModifiedQueueActiveLock;
246 itk::MutexLock::Pointer ModifiedQueueLock;
247 itk::MutexLock::Pointer ReadDataQueueActiveLock;
248 itk::MutexLock::Pointer ReadDataQueueLock;
249 itk::MutexLock::Pointer WriteDataQueueActiveLock;
250 itk::MutexLock::Pointer WriteDataQueueLock;
251 vtkTimeStamp RequestTimeStamp;
252 int ProcessingThreadId;
253 std::vector<int> NetworkingThreadIDs;
254 int ProcessingThreadActive;
255 int ModifiedQueueActive;
256 int ReadDataQueueActive;
257 int WriteDataQueueActive;
259 ProcessingTaskQueue* InternalTaskQueue;
260 ModifiedQueue* InternalModifiedQueue;
261 ReadDataQueue* InternalReadDataQueue;
262 WriteDataQueue* InternalWriteDataQueue;
static vtkMRMLApplicationLogic * New()
A set of MRML Nodes that supports serialization and undo/redo.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
RequestEvents
List of events potentially fired by the application logic.
MRML node for storing information about the active nodes in the scene.