18 #ifndef __vtkSlicerApplicationLogic_h 19 #define __vtkSlicerApplicationLogic_h 28 #include <vtkCollection.h> 31 #include <itkMultiThreader.h> 32 #include <itkMutexLock.h> 40 class ProcessingTaskQueue;
42 class ReadDataRequest;
44 class WriteDataRequest;
54 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
70 void PropagateFiducialListSelection();
73 void CreateProcessingThread();
76 void TerminateProcessingThread();
104 vtkMTimeType RequestModified(vtkObject *);
114 vtkMTimeType RequestReadFile(
const char *refNode,
const char *filename,
115 int displayData =
false,
int deleteFile =
false);
123 vtkMTimeType RequestUpdateParentTransform(
const std::string &updatedNode,
const std::string& parentTransformNode);
131 vtkMTimeType RequestUpdateSubjectHierarchyLocation(
const std::string &updatedNode,
const std::string& siblingNode);
136 unsigned int GetReadDataQueueSize();
144 vtkMTimeType RequestWriteData(
const char *refNode,
const char *filename);
156 vtkMTimeType RequestReadScene(
const std::string& filename,
157 std::vector<std::string> &targetIDs,
158 std::vector<std::string> &sourceIDs,
159 int displayData =
false,
160 int deleteFile =
false);
166 void ProcessModified();
172 void ProcessReadData();
175 void ProcessWriteData();
188 static bool IsEmbeddedModule(
const std::string& filePath,
const std::string& applicationHomeDir,
189 const std::string& slicerRevision);
195 static bool IsPluginInstalled(
const std::string& filePath,
const std::string& applicationHomeDir);
198 static bool IsPluginBuiltIn(
const std::string& filePath,
const std::string& applicationHomeDir);
201 static std::string GetModuleShareDirectory(
const std::string& moduleName,
const std::string& filePath);
204 static std::string GetModuleSlicerXYShareDirectory(
const std::string& filePath);
207 static std::string GetModuleSlicerXYLibDirectory(
const std::string& filePath);
215 static ITK_THREAD_RETURN_TYPE ProcessingThreaderCallback(
void * );
218 static ITK_THREAD_RETURN_TYPE NetworkingThreaderCallback(
void * );
221 void ProcessProcessingTasks();
224 void ProcessNetworkingTasks();
230 void ProcessReadSceneData( ReadDataRequest &req );
231 void ProcessWriteSceneData( WriteDataRequest &req );
237 itk::MultiThreader::Pointer ProcessingThreader;
238 itk::MutexLock::Pointer ProcessingThreadActiveLock;
239 itk::MutexLock::Pointer ProcessingTaskQueueLock;
240 itk::MutexLock::Pointer ModifiedQueueActiveLock;
241 itk::MutexLock::Pointer ModifiedQueueLock;
242 itk::MutexLock::Pointer ReadDataQueueActiveLock;
243 itk::MutexLock::Pointer ReadDataQueueLock;
244 itk::MutexLock::Pointer WriteDataQueueActiveLock;
245 itk::MutexLock::Pointer WriteDataQueueLock;
246 vtkTimeStamp RequestTimeStamp;
247 int ProcessingThreadId;
248 std::vector<int> NetworkingThreadIDs;
249 int ProcessingThreadActive;
250 int ModifiedQueueActive;
251 int ReadDataQueueActive;
252 int WriteDataQueueActive;
254 ProcessingTaskQueue* InternalTaskQueue;
255 ModifiedQueue* InternalModifiedQueue;
256 ReadDataQueue* InternalReadDataQueue;
257 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.