Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLProceduralColorNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2006 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLProceduralColorNode.h,v $
10  Date: $Date: 2006/03/19 17:12:28 $
11  Version: $Revision: 1.0 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLProceduralColorNode_h
16 #define __vtkMRMLProceduralColorNode_h
17 
18 #include "vtkMRMLColorNode.h"
19 
20 class vtkColorTransferFunction;
21 
27 class VTK_MRML_EXPORT vtkMRMLProceduralColorNode : public vtkMRMLColorNode
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
33 
34  //--------------------------------------------------------------------------
36  //--------------------------------------------------------------------------
37 
38  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
39 
42  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
43 
46  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
47 
50  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
51 
54  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "ProceduralColor";};
55 
58  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
59 
62  virtual const char * GetTypeAsString() VTK_OVERRIDE;
63 
64  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) VTK_OVERRIDE;
65 
67  //enum
68  //{
70  //};
71 
73  enum
74  {
75  DisplayModifiedEvent = 20000
76  };
77 
81  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
82 
85  virtual void SetAndObserveColorTransferFunction(vtkColorTransferFunction *ctf);
86 
89  static bool IsColorMapEqual(vtkColorTransferFunction* tf1, vtkColorTransferFunction* tf2);
90 
95  virtual vtkLookupTable * GetLookupTable() VTK_OVERRIDE;
96 
100  virtual vtkScalarsToColors* GetScalarsToColors() VTK_OVERRIDE;
101 
104  bool SetNameFromColor(int index) VTK_OVERRIDE;
105 
108  virtual int GetNumberOfColors() VTK_OVERRIDE;
109 
111  virtual bool GetColor(int entry, double color[4]) VTK_OVERRIDE;
112 
114  virtual vtkMRMLStorageNode* CreateDefaultStorageNode() VTK_OVERRIDE;
115 
119  vtkGetMacro(NumberOfTableValues, unsigned int)
120 
124  vtkSetMacro(NumberOfTableValues, unsigned int)
125 
126 protected:
128  ~vtkMRMLProceduralColorNode();
129  vtkMRMLProceduralColorNode(const vtkMRMLProceduralColorNode&);
130  void operator=(const vtkMRMLProceduralColorNode&);
131 
134  vtkColorTransferFunction *ColorTransferFunction;
135 
139  vtkLookupTable *ConvertedCTFtoLUT;
140 
145  unsigned int NumberOfTableValues;
146 };
147 
148 #endif
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
MRMLNode methods.
static vtkMRMLColorNode * New()
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
alternative method to propagate events generated in Storage nodes
A supercalss for other storage nodes.
Abstract MRML node to represent color information.
MRML node to represent procedurally defined color information.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual vtkLookupTable * GetLookupTable()
virtual const char * GetTypeAsString()
return a text string describing the colour look up table type