Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationSnapshotNode.h
Go to the documentation of this file.
1 // .NAME vtkMRMLAnnotationSnapshotNode - MRML node to represent scene snapshot including description and screenshot
2 // .SECTION Description
3 // n/A
4 //
5 
6 #ifndef __vtkMRMLAnnotationSnapshotNode_h
7 #define __vtkMRMLAnnotationSnapshotNode_h
8 
9 #include "vtkSlicerAnnotationsModuleMRMLExport.h"
11 #include "vtkMRMLAnnotationNode.h"
12 
13 #include <vtkStdString.h>
14 class vtkImageData;
15 class vtkStringArray;
16 class vtkMRMLStorageNode;
17 
19 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationSnapshotNode : public vtkMRMLAnnotationNode
20 {
21 public:
24 
25  //--------------------------------------------------------------------------
26  // MRMLNode methods
27  //--------------------------------------------------------------------------
28 
29  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
30  // Description:
31  // Get node XML tag name (like Volume, Model)
32  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "AnnotationSnapshot";}
33 
34  virtual const char* GetIcon() VTK_OVERRIDE {return ":/Icons/ViewCamera.png";}
35 
36  void SetSnapshotDescription(const vtkStdString& newDescription);
37  vtkGetMacro(SnapshotDescription, vtkStdString)
38 
39  void WriteXML(ostream& of, int nIndent) VTK_OVERRIDE;
40  void ReadXMLAttributes(const char** atts) VTK_OVERRIDE;
41 
43  virtual void SetScreenShot(vtkImageData* );
44  vtkGetObjectMacro(ScreenShot, vtkImageData);
45 
47  vtkGetMacro(ScaleFactor, double);
48  vtkSetMacro(ScaleFactor, double);
49 
56  // TODO use an enum for the types
57  void SetScreenShotType(int type);
58  vtkGetMacro(ScreenShotType, int);
59 
61  virtual vtkMRMLStorageNode* CreateDefaultStorageNode() VTK_OVERRIDE;
62 
63  enum
64  {
65  SnapshotNodeAddedEvent = 0,
67  };
68 
69 protected:
74 
76  vtkStdString SnapshotDescription;
77 
79  vtkImageData* ScreenShot;
80 
88 
89  double ScaleFactor;
90 
91 };
92 
93 #endif
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE
Read node attributes from XML file
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Write this node&#39;s information to a MRML file in XML format.
vtkStdString SnapshotDescription
The associated Description.
void operator=(const vtkMRMLAnnotationNode &)
virtual const char * GetIcon() VTK_OVERRIDE
A superclass for other storage nodes.
static vtkMRMLAnnotationNode * New()
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
MRMLNode methods.
virtual vtkMRMLStorageNode * CreateDefaultStorageNode() VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
vtkImageData * ScreenShot
The vtkImageData of the screenshot.