Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkDataIOManager.h
Go to the documentation of this file.
1 #ifndef __vtkDataIOManager_h
2 #define __vtkDataIOManager_h
3 
4 // MRML includes
5 #include "vtkMRML.h"
6 class vtkCacheManager;
8 class vtkDataTransfer;
9 class vtkMRMLNode;
10 
11 // VTK includes
12 #include <vtkObject.h>
13 class vtkCallbackCommand;
14 class vtkCollection;
15 
16 #ifndef vtkObjectPointer
17 #define vtkObjectPointer(xx) (reinterpret_cast <vtkObject **>( (xx) ))
18 #endif
19 
20 class VTK_MRML_EXPORT vtkDataIOManager : public vtkObject
21 {
22  public:
23 
25  static vtkDataIOManager *New();
26  vtkTypeMacro(vtkDataIOManager,vtkObject);
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28  vtkGetObjectMacro ( DataTransferCollection, vtkCollection );
29  void SetDataTransferCollection(vtkCollection* dataTransfer );
30  vtkGetObjectMacro ( CacheManager, vtkCacheManager );
31  virtual void SetCacheManager(vtkCacheManager* cacheManager);
32  vtkGetMacro ( EnableAsynchronousIO, int );
33  vtkGetMacro ( InUpdateCallbackFlag, int );
34  vtkSetMacro ( InUpdateCallbackFlag, int );
35 
38  vtkDataFileFormatHelper* GetFileFormatHelper();
39  virtual void SetFileFormatHelper(vtkDataFileFormatHelper* helper);
40 
41  void SetEnableAsynchronousIO ( int );
42 
45  vtkDataTransfer *AddNewDataTransfer ( );
46  vtkDataTransfer *AddNewDataTransfer ( vtkMRMLNode *node);
47  void AddNewDataTransfer ( vtkDataTransfer *transfer, vtkMRMLNode *node);
48  void AllTransfersClearedFromCache();
49 
52  void AddDataTransfer ( vtkDataTransfer *transfer );
55  void RemoveDataTransfer ( vtkDataTransfer *transfer );
56  void RemoveDataTransfer ( int transferID );
57  int GetNumberOfDataTransfers();
60  vtkDataTransfer *GetDataTransfer ( int transferID );
64  void ClearDataTransfers ( );
67  int GetUniqueTransferID ( );
68 
72  void QueueRead ( vtkMRMLNode *node );
73 
77  void QueueWrite ( vtkMRMLNode *node );
78 
83  void SetTransferStatus(vtkDataTransfer *transfer, int status);
84  int GetTransferStatus( vtkDataTransfer *transfer);
85 
86  const char* GetTransferStatusString( vtkDataTransfer *transfer );
87 
88  virtual void ProcessTransferUpdates ( vtkObject *caller, unsigned long event, void *callData );
89 
90  enum
91  {
92  RemoteReadEvent = 19001,
100  RefreshDisplayEvent
101  };
102 
104  static void TransferUpdateCallback ( vtkObject *__caller,
105  unsigned long eid, void *__clientData, void *callData );
106 
108  vtkCallbackCommand *TransferUpdateCommand;
110 
111  private:
112  vtkCollection *DataTransferCollection;
113  vtkCacheManager *CacheManager;
114  int EnableAsynchronousIO;
115 
116  vtkDataFileFormatHelper* FileFormatHelper;
117 
118  protected:
120  ~vtkDataIOManager() override;
122  void operator=(const vtkDataIOManager&);
123 
124 };
125 
126 #endif
127 
128 
129 
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
vtkCallbackCommand * TransferUpdateCommand
Holder for update callback.