Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerApplicationLogicRequests.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
6 
7 ==========================================================================*/
10 
11 #ifndef __vtkSlicerApplicationLogicRequests_h
12 #define __vtkSlicerApplicationLogicRequests_h
13 
15 
16 //----------------------------------------------------------------------------
18 {
19 public:
21  {
22  m_UID = 0;
23  }
24 
25  DataRequest(int uid)
26  {
27  m_UID = uid;
28  }
29 
30  virtual ~DataRequest(){}
31 
33 
34  int GetUID()const{return m_UID;}
35 
36 protected:
37  vtkMTimeType m_UID;
38 };
39 
40 //----------------------------------------------------------------------------
42 {
43 public:
44  ReadDataRequestFile(const std::string& node, const std::string& filename,
45  int displayData, int deleteFile, int uid = 0)
46  : DataRequest(uid)
47  {
48  m_TargetNode = node;
49  m_Filename = filename;
50  m_DisplayData = displayData;
51  m_DeleteFile = deleteFile;
52  }
53 
55  {
56  // This method needs to read the data into the specific type of node and set up an
57  // appropriate storage and display node.
58 
59  vtkMRMLNode *nd = appLogic->GetMRMLScene()->GetNodeByID(m_TargetNode.c_str());
60  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: read data request node id = " << nd->GetID());
61 
62  vtkSmartPointer<vtkMRMLStorageNode> storageNode;
63 #ifdef Slicer_BUILD_CLI_SUPPORT
65 #endif
66 
67  bool useURI = appLogic->GetMRMLScene()->GetCacheManager()->IsRemoteReference(m_Filename.c_str());
68 
70  if (storableNode)
71  {
72  int numStorageNodes = storableNode->GetNumberOfStorageNodes();
73  for (int n = 0; n < numStorageNodes; n++)
74  {
75  vtkMRMLStorageNode *testStorageNode = storableNode->GetNthStorageNode(n);
76  if (testStorageNode)
77  {
78  if (useURI && testStorageNode->GetURI() != NULL)
79  {
80  if (m_Filename.compare(testStorageNode->GetURI()) == 0)
81  {
82  // found a storage node for the remote file
83  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: found a storage node with the right URI: " << testStorageNode->GetURI());
84  storageNode = testStorageNode;
85  break;
86  }
87  }
88  else if (testStorageNode->GetFileName() != NULL &&
89  m_Filename.compare(testStorageNode->GetFileName()) == 0)
90  {
91  // found the right storage node for a local file
92  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: found a storage node with the right filename: " << testStorageNode->GetFileName());
93  storageNode = testStorageNode;
94  break;
95  }
96  }
97  }
98 
99  // if there wasn't already a matching storage node on the node, make one
100  bool createdNewStorageNode = false;
101  if (storageNode.GetPointer() == NULL)
102  {
103  // Read the data into the referenced node
104  if (itksys::SystemTools::FileExists(m_Filename.c_str()))
105  {
106  // file is there on disk
107  storableNode->AddDefaultStorageNode(m_Filename.c_str());
108  storageNode = storableNode->GetStorageNode();
109  createdNewStorageNode = (storageNode != NULL);
110  }
111  }
112 
113  // Have the storage node read the data into the current node
114  if (storageNode.GetPointer() != NULL)
115  {
116  try
117  {
118  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: about to call read data, " \
119  "storage node's read state is " << storageNode->GetReadStateAsString());
120  if (useURI)
121  {
122  storageNode->SetURI(m_Filename.c_str());
123  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: calling ReadData on the storage node " \
124  << storageNode->GetID() << ", uri = " << storageNode->GetURI());
125  storageNode->ReadData(nd, /*temporary*/true);
126  if (createdNewStorageNode)
127  {
128  storageNode->SetURI(NULL); // clear temporary URI
129  }
130  }
131  else
132  {
133  storageNode->SetFileName(m_Filename.c_str());
134  vtkDebugWithObjectMacro(appLogic, "ProcessReadNodeData: calling ReadData on the storage node " \
135  << storageNode->GetID() << ", filename = " << storageNode->GetFileName());
136  storageNode->ReadData(nd, /*temporary*/true);
137  if (createdNewStorageNode)
138  {
139  storageNode->SetFileName(NULL); // clear temp file name
140  }
141  }
142  }
143  catch (itk::ExceptionObject& exc)
144  {
145  vtkErrorWithObjectMacro(appLogic, "Exception while reading " << m_Filename << ", " << exc);
146  }
147  catch (...)
148  {
149  vtkErrorWithObjectMacro(appLogic, "Unknown exception while reading " << m_Filename);
150  }
151  }
152  }
153 #ifdef Slicer_BUILD_CLI_SUPPORT
154  // if the node was a CommandLineModule node, then read the file
155  // (no storage node for these, yet)
156  if (clp)
157  {
159  }
160 #endif
161 
162  // Delete the file if requested
163  if (m_DeleteFile)
164  {
165  int removed;
166  // is it a shared memory location?
167  if (m_Filename.find("slicer:") != std::string::npos)
168  {
169  removed = 1;
170  }
171  else
172  {
173  removed = itksys::SystemTools::RemoveFile(m_Filename.c_str());
174  }
175  if (!removed)
176  {
177  vtkGenericWarningMacro("Unable to delete temporary file " << m_Filename);
178  }
179  }
180 
181 
182  // Get the right type of display node. Only create a display node
183  // if one does not exist already
184  //
185  vtkMRMLDisplayableNode *displayableNode =
187  if (displayableNode)
188  {
189  // Create a default display node if no display node exists for the node yet.
190  displayableNode->CreateDefaultDisplayNodes();
191  }
192 
193  // Cause the any observers to fire (we may have avoided calling
194  // modified on the node)
195  //
196  nd->Modified();
197 
198  // If scalar volume, set the volume as the active volume and
199  // propagate selection.
200  //
201  // Models are always displayed when loaded above.
202  //
203  // Tensors? Vectors?
204  if (m_DisplayData)
205  {
207  {
209  appLogic->PropagateVolumeSelection();
210  }
211  else if (vtkMRMLScalarVolumeNode::SafeDownCast(nd) != NULL)
212  {
213  appLogic->GetSelectionNode()->SetActiveVolumeID(m_TargetNode.c_str());
214  // make sure win/level gets calculated
216  if (displayNode)
217  {
218  displayNode->Modified();
219  }
220  appLogic->PropagateVolumeSelection();
221  }
222  else if (vtkMRMLTableNode::SafeDownCast(nd) != NULL)
223  {
224  appLogic->GetSelectionNode()->SetActiveTableID(m_TargetNode.c_str());
225  appLogic->PropagateTableSelection();
226  }
227  }
228  }
229 
230 protected:
231  std::string m_TargetNode;
232  std::string m_Filename;
235 };
236 
237 //----------------------------------------------------------------------------
239 {
240 public:
241  ReadDataRequestScene(const std::vector<std::string>& targetNodes,
242  const std::vector<std::string>& sourceNodes,
243  const std::string& filename,
244  int displayData, int deleteFile,
245  int uid = 0)
246  : DataRequest(uid)
247  {
248  m_TargetNodes = targetNodes;
249  m_SourceNodes = sourceNodes;
250  m_Filename = filename;
251  m_DisplayData = displayData;
252  m_DeleteFile = deleteFile;
253  }
254 
256  {
257  if (m_SourceNodes.size() != m_TargetNodes.size())
258  {
259  // Can't do ID remapping if the two node lists are different
260  // sizes. Just import the scene. (This is where we would put to
261  // the code to load into a node hierarchy (with a corresponding
262  // change in the conditional above)).
263  appLogic->GetMRMLScene()->SetURL(m_Filename.c_str());
264  appLogic->GetMRMLScene()->Import();
265 
266  // Delete the file if requested
267  if (m_DeleteFile)
268  {
269  int removed;
270  removed = itksys::SystemTools::RemoveFile(m_Filename.c_str());
271  if (!removed)
272  {
273  std::stringstream information;
274  information << "Unable to delete temporary file "
275  << m_Filename << std::endl;
276  vtkGenericWarningMacro( << information.str().c_str() );
277  }
278  }
279 
280  return;
281  }
282 
283  vtkNew<vtkMRMLScene> miniscene;
284  miniscene->SetURL(m_Filename.c_str() );
285  miniscene->Import();
286 
287  // iterate over the list of nodes specified to read
288  std::vector<std::string>::const_iterator tit;
289  std::vector<std::string>::const_iterator sit;
290 
291  tit = m_TargetNodes.begin();
292  sit = m_SourceNodes.begin();
293 
295 
296  while (sit != m_SourceNodes.end())
297  {
298  vtkMRMLNode *source = miniscene->GetNodeByID((*sit).c_str());
299  vtkMRMLNode *target = appLogic->GetMRMLScene()->GetNodeByID( (*tit).c_str() );
300 
301  if (source && target)
302  {
303  // save old storage info (in case user has custom file name already
304  // defined for this node, don't use the one from the miniscene since it
305  // was only used to read/write the temp area).
306  vtkMRMLStorableNode *storableTarget = vtkMRMLStorableNode::SafeDownCast(target);
307  if ( storableTarget )
308  {
309  const char *oldStorageNodeID = storableTarget->GetStorageNodeID();
310  target->Copy(source);
311  storableTarget->SetAndObserveStorageNodeID(oldStorageNodeID);
312  }
313  else
314  {
315  target->Copy(source);
316  }
317 
318  // if the source node is a model hierarchy node, then also copy
319  // and remap any child nodes of the target that are not in the
320  // target list (nodes that had no source equivalent before the
321  // module ran).
326  if (smhnd && tmhnd)
327  {
328  // get the model node and display node BEFORE we add nodes to
329  // the target scene
330  vtkMRMLModelNode *smnd = smhnd->GetModelNode();
331  vtkMRMLDisplayNode *sdnd = smhnd->GetDisplayNode();
332 
333  // add the model and display referenced by source model hierarchy node
334  if (smnd)
335  {
336  // set the model node to be modified, as it was read from a temp
337  // location
338  //smnd->SetModifiedSinceRead(1);
339  // get display node BEFORE we add nodes to the target scene
340  vtkMRMLDisplayNode *sdnd1 = smnd->GetDisplayNode();
341 
342  vtkMRMLNode *tmodel = appLogic->GetMRMLScene()->CopyNode(smnd);
345  tmhnd->SetModelNodeID( mnd->GetID() );
346 
347  if (sdnd1)
348  {
349  vtkMRMLNode *tdnd = appLogic->GetMRMLScene()->CopyNode(sdnd1);
350  mnd->SetAndObserveDisplayNodeID( tdnd->GetID() );
351  }
352  }
353 
354  if (sdnd)
355  {
356  vtkMRMLNode *dnd = appLogic->GetMRMLScene()->CopyNode(sdnd);
357  tmhnd->SetAndObserveDisplayNodeID( dnd->GetID() );
358  }
359 
360  // add any children model hierarchy nodes, rinse, repeat
361  //
362  // keep a map of model hierarchy node ids so that can update the parent node references
363  std::map<std::string, std::string> parentNodeIDMapper;
364  // hopefully the parents will have been read first, but if not
365  // keep a list of model hierarchy nodes that failed to have their parent node reference remapped
366  std::vector<vtkMRMLModelHierarchyNode *> childNodesThatNeedParentsIDsRemapped;
367  for (int n=0;
368  n<miniscene->GetNumberOfNodesByClass("vtkMRMLModelHierarchyNode");
369  n++)
370  {
372  ::SafeDownCast(miniscene->GetNthNodeByClass(n,
373  "vtkMRMLModelHierarchyNode"));
374  if (mhnd)
375  {
376  // is this model hierarchy node in our source list
377  // already? if so skip it
378  std::vector<std::string>::const_iterator ssit
379  = std::find(m_SourceNodes.begin(),
380  m_SourceNodes.end(), mhnd->GetID());
381  if (ssit == m_SourceNodes.end())
382  {
383  // not in source list, so we may need to add it,
384  // if it's a child, grandchild etc of the top level node that we're importing
385  if (strcmp(mhnd->GetTopParentNode()->GetID(), smhnd->GetID()) == 0)
386  {
387  // get the model and display node BEFORE we add nodes
388  // to the target scene
389  vtkMRMLModelNode *smnd1 = mhnd->GetModelNode();
390  vtkMRMLDisplayNode *sdnd1 = mhnd->GetDisplayNode();
391 
392  vtkMRMLNode *tchild = appLogic->GetMRMLScene()->CopyNode(mhnd);
393  // keep track of any node id change in case other nodes use this as a parent
394  parentNodeIDMapper[std::string(mhnd->GetID())] = std::string(tchild->GetID());
397  // check for a parent node id in the mapper (as long as it doesn't already
398  // point to the source node), default to the top level one though
399  std::string parentNodeID = std::string(tmhnd->GetID());
400  if (tcmhd->GetParentNodeID() != NULL &&
401  strcmp(tcmhd->GetParentNodeID(),smhnd->GetID()) != 0)
402  {
403  std::map<std::string,std::string>::iterator pIt = parentNodeIDMapper.find(std::string(tcmhd->GetParentNodeID()));
404  if (pIt != parentNodeIDMapper.end())
405  {
406  parentNodeID = pIt->second;
407  vtkDebugWithObjectMacro(appLogic, "Remapped parent node id to " << parentNodeID.c_str());
408  }
409  else
410  {
411  childNodesThatNeedParentsIDsRemapped.push_back(tcmhd);
412  }
413  }
414  tcmhd->SetParentNodeID( parentNodeID.c_str() );
415 
416  if (smnd1)
417  {
418  // set it as modified
419  //smnd1->SetModifiedSinceRead(1);
420  // get display node BEFORE we add nodes to the target scene
421  vtkMRMLDisplayNode *sdnd2 = smnd1->GetDisplayNode();
422 
423  vtkMRMLNode *tmodel = appLogic->GetMRMLScene()->CopyNode(smnd1);
426  tcmhd->SetModelNodeID( mnd->GetID() );
427 
428  if (sdnd2)
429  {
430  vtkMRMLNode *tdnd = appLogic->GetMRMLScene()->CopyNode(sdnd2);
431  mnd->SetAndObserveDisplayNodeID( tdnd->GetID() );
432  }
433  }
434 
435  if (sdnd1)
436  {
437  vtkMRMLNode *tdnd = appLogic->GetMRMLScene()->CopyNode(sdnd1);
438  tcmhd->SetAndObserveDisplayNodeID( tdnd->GetID() );
439  }
440  }
441  }
442  }
443  }
444  if (childNodesThatNeedParentsIDsRemapped.size() > 0)
445  {
446  // iterate through all the imported hierarchies that failed and double check their parent node ids
447  for (unsigned int i = 0; i < childNodesThatNeedParentsIDsRemapped.size(); i++)
448  {
449  std::map<std::string,std::string>::iterator pIt = parentNodeIDMapper.find(childNodesThatNeedParentsIDsRemapped[i]->GetParentNodeID());
450  if (pIt != parentNodeIDMapper.end())
451  {
452  vtkDebugWithObjectMacro(appLogic, "Remapping child node " << childNodesThatNeedParentsIDsRemapped[i]->GetName() << \
453  " parent node id from " << childNodesThatNeedParentsIDsRemapped[i]->GetParentNodeID() << " to " << pIt->second.c_str());
454  childNodesThatNeedParentsIDsRemapped[i]->SetParentNodeID(pIt->second.c_str());
455  }
456  }
457  }
458  }
459  }
460  else if (!source)
461  {
462  std::stringstream information;
463  information << "Node " << (*sit) << " not found in scene file "
464  << m_Filename << std::endl;
465  vtkGenericWarningMacro( << information.str().c_str() );
466  }
467  else if (!target)
468  {
469  std::stringstream information;
470  information << "Node " << (*tit) << " not found in current scene."
471  << std::endl;
472  vtkGenericWarningMacro( << information.str().c_str() );
473  }
474 
475  ++sit;
476  ++tit;
477  }
478 
480 
481  // Delete the file if requested
482  if (m_DeleteFile)
483  {
484  int removed;
485  removed = itksys::SystemTools::RemoveFile( m_Filename.c_str() );
486  if (!removed)
487  {
488  std::stringstream information;
489  information << "Unable to delete temporary file "
490  << m_Filename << std::endl;
491  vtkGenericWarningMacro( << information.str().c_str() );
492  }
493  }
494  }
495 
496 protected:
497  std::vector<std::string> m_TargetNodes;
498  std::vector<std::string> m_SourceNodes;
499  std::string m_Filename;
502 };
503 
504 //----------------------------------------------------------------------------
506 {
507 public:
508  ReadDataRequestUpdateParentTransform(const std::string& updatedNode,
509  const std::string& parentTransformNode, int uid = 0)
510  : DataRequest(uid)
511  {
512  m_UpdatedNode = updatedNode;
513  m_ParentTransformNode = parentTransformNode;
514  }
515 
517  {
518  vtkMRMLScene* scene = appLogic->GetMRMLScene();
520  scene->GetNodeByID(m_UpdatedNode));
521  if (node)
522  {
524  }
525  }
526 
527 protected:
528  std::string m_UpdatedNode;
530 };
531 
532 //----------------------------------------------------------------------------
534 {
535 public:
536  ReadDataRequestUpdateSubjectHierarchyLocation(const std::string& updatedNode,
537  const std::string& siblingNode, int uid = 0)
538  : DataRequest(uid)
539  {
540  m_UpdatedNode = updatedNode;
541  m_SubjectHierarchySiblingNode = siblingNode;
542  }
543 
545  {
546  vtkMRMLScene* scene = appLogic->GetMRMLScene();
547 
549  vtkMRMLNode *updatedNode = scene->GetNodeByID(m_UpdatedNode);
551  vtkIdType siblingNodeShItemID = shnd->GetItemByDataNode(siblingNode);
552  vtkIdType updatedNodeShItemID = shnd->GetItemByDataNode(updatedNode);
553 
554  if (updatedNodeShItemID && siblingNodeShItemID)
555  {
556  vtkIdType parentItemID = shnd->GetItemParent(siblingNodeShItemID);
557  shnd->SetItemParent(updatedNodeShItemID, parentItemID);
558  shnd->SetItemLevel(updatedNodeShItemID, shnd->GetItemLevel(siblingNodeShItemID));
559  }
560  }
561 
562 protected:
563  std::string m_UpdatedNode;
565 };
566 
567 //----------------------------------------------------------------------------
569 {
570 public:
572  const std::string& vtkNotUsed(node),
573  const std::string& vtkNotUsed(filename),
574  int uid = 0)
575  : DataRequest(uid)
576  {
577  }
578 protected:
579  std::string m_SourceNode;
580  std::string m_Filename;
581 };
582 
583 //----------------------------------------------------------------------------
585 {
586 public:
587  WriteDataRequestScene(const std::vector<std::string>& targetNodes,
588  const std::vector<std::string>& sourceNodes,
589  const std::string& filename,
590  int uid = 0)
591  : DataRequest(uid)
592  {
593  m_TargetNodes = targetNodes;
594  m_SourceNodes = sourceNodes;
595  m_Filename = filename;
596  }
597 
599  {
600  if (m_SourceNodes.size() != m_TargetNodes.size())
601  {
602  // Can't do ID remapping if the two node lists are different
603  // sizes. Just commit the scene. (This is where we would put to
604  // the code to load into a node hierarchy (with a corresponding
605  // change in the conditional above)).
606  appLogic->GetMRMLScene()->SetURL( m_Filename.c_str() );
607  appLogic->GetMRMLScene()->Commit();
608  return;
609  }
610  }
611 
612 protected:
613  std::vector<std::string> m_TargetNodes;
614  std::vector<std::string> m_SourceNodes;
615  std::string m_Filename;
616 };
617 
618 
619 #endif // __vtkSlicerApplicationLogicRequests_h
virtual bool AddDefaultStorageNode(const char *filename=NULL)
void Execute(vtkSlicerApplicationLogic *appLogic)
void SetActiveVolumeID(const char *id)
void EndState(unsigned long state)
Unflag the scene as being in a state mode.
ReadDataRequestUpdateSubjectHierarchyLocation(const std::string &updatedNode, const std::string &siblingNode, int uid=0)
void SetAndObserveDisplayNodeID(const char *displayNodeID)
vtkMRMLStorageNode * GetNthStorageNode(int n)
Get associated display MRML node
vtkMRMLHierarchyNode * GetTopParentNode()
Get the top parent node in the hierarchy
bool SetAndObserveTransformNodeID(const char *transformNodeID)
MRML node to represent a 3D surface model.
void SetItemLevel(vtkIdType itemID, std::string level)
Convenience function to set level attribute for a subject hierarchy item.
WriteDataRequestScene(const std::vector< std::string > &targetNodes, const std::vector< std::string > &sourceNodes, const std::string &filename, int uid=0)
vtkMRMLSelectionNode * GetSelectionNode() const
Get default Selection node.
virtual char * GetURI()
vtkMRMLScene * GetMRMLScene() const
Return a reference to the current MRML scene.
vtkMRMLNode * CopyNode(vtkMRMLNode *n)
Add a copy of a node to the scene.
std::vector< std::string > m_SourceNodes
WriteDataRequestFile(const std::string &vtkNotUsed(node), const std::string &vtkNotUsed(filename), int uid=0)
void SetAndObserveDisplayNodeID(const char *DisplayNodeID)
MRML node to represent a complete subject hierarchy tree.
static vtkMRMLModelHierarchyNode * SafeDownCast(vtkObject *o)
void PropagateVolumeSelection(int fit=1)
static vtkMRMLCommandLineModuleNode * SafeDownCast(vtkObject *o)
void SetActiveLabelVolumeID(const char *id)
void SetItemParent(vtkIdType itemID, vtkIdType parentItemID)
Set the parent of a subject hierarchy item.
const char * GetStorageNodeID()
vtkMRMLDisplayNode * GetDisplayNode()
Get associated display MRML node
virtual void Copy(vtkMRMLNode *node)
Copy parameters (not including ID and Scene) from another node of the same type.
MRML node to represent a 3D surface model.
void SetAndObserveStorageNodeID(const char *storageNodeID)
String ID of the storage MRML node
int Commit(const char *url=NULL)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
virtual char * GetID()
ID use by other nodes to reference this node in XML.
std::vector< std::string > m_SourceNodes
virtual char * GetFileName()
ReadDataRequestUpdateParentTransform(const std::string &updatedNode, const std::string &parentTransformNode, int uid=0)
static vtkMRMLLabelMapVolumeNode * SafeDownCast(vtkObject *o)
static vtkMRMLSubjectHierarchyNode * GetSubjectHierarchyNode(vtkMRMLScene *scene)
virtual void CreateDefaultDisplayNodes()
void StartState(unsigned long state, int anticipatedMaxProgress=0)
Flag the scene as being in a state mode.
void PropagateTableSelection()
Propagate selected table in the SelectionNode to table view nodes.
virtual vtkCacheManager * GetCacheManager()
std::vector< std::string > m_TargetNodes
vtkMRMLNode * GetNodeByID(const char *name)
Get node given a unique ID.
vtkMRMLDisplayNode * GetDisplayNode()
static vtkMRMLStorableNode * SafeDownCast(vtkObject *o)
void Execute(vtkSlicerApplicationLogic *appLogic)
std::string GetItemLevel(vtkIdType itemID)
Convenience function to get level attribute for a subject hierarchy item.
A superclass for other storage nodes.
void SetModelNodeID(const char *id)
String ID of the model MRML node
MRML node to represent a hierarchyu of models.
static vtkMRMLTableNode * SafeDownCast(vtkObject *o)
vtkMRMLModelNode * GetModelNode()
Get associated model MRML node
void SetURL(const char *url)
Set URL (file name) of the scene.
virtual int IsRemoteReference(const char *uri)
vtkIdType GetItemByDataNode(vtkMRMLNode *dataNode)
vtkMRMLStorageNode * GetStorageNode()
void Execute(vtkSlicerApplicationLogic *appLogic)
static vtkMRMLScalarVolumeNode * SafeDownCast(vtkObject *o)
bool ReadParameterFile(const std::string &filename)
static vtkMRMLDisplayableNode * SafeDownCast(vtkObject *o)
virtual void SetURI(const char *)
Location of the remote copy of this file.
Abstract class that contains graphical display properties for displayable nodes.
virtual void Modified() VTK_OVERRIDE
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
Definition: vtkMRMLNode.h:434
void SetActiveTableID(const char *id)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
MRML node for representing the parameters allowing to run a command line interface module (CLI)...
ReadDataRequestScene(const std::vector< std::string > &targetNodes, const std::vector< std::string > &sourceNodes, const std::string &filename, int displayData, int deleteFile, int uid=0)
int Import()
Add the scene into the existing scene (no clear) from URL file or from.
vtkIdType GetItemParent(vtkIdType itemID)
std::vector< std::string > m_TargetNodes
static vtkMRMLTransformableNode * SafeDownCast(vtkObject *o)
static vtkMRMLModelNode * SafeDownCast(vtkObject *o)
MRML node for representing a node with a transform.
void Execute(vtkSlicerApplicationLogic *appLogic)
ReadDataRequestFile(const std::string &node, const std::string &filename, int displayData, int deleteFile, int uid=0)
virtual void Execute(vtkSlicerApplicationLogic *)