Slicer  4.13
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) override;
33 
34  //--------------------------------------------------------------------------
36  //--------------------------------------------------------------------------
37 
38  vtkMRMLNode* CreateNodeInstance() override;
39 
42  void ReadXMLAttributes( const char** atts) override;
43 
46  void WriteXML(ostream& of, int indent) override;
47 
50  void Copy(vtkMRMLNode *node) override;
51 
54  const char* GetNodeTagName() override {return "ProceduralColor";};
55 
58  void UpdateScene(vtkMRMLScene *scene) override;
59 
62  const char * GetTypeAsString() override;
63 
64  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) 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  vtkLookupTable * GetLookupTable() override;
96 
100  vtkScalarsToColors* GetScalarsToColors() override;
101 
104  bool SetNameFromColor(int index) override;
105 
108  int GetNumberOfColors() override;
109 
111  bool GetColor(int entry, double color[4]) override;
112 
115 
119  vtkGetMacro(NumberOfTableValues, unsigned int)
120 
121 
122  vtkSetMacro(NumberOfTableValues, unsigned int)
125 
126 protected:
128  ~vtkMRMLProceduralColorNode() override;
131 
134  vtkColorTransferFunction *ColorTransferFunction;
135 
139  vtkLookupTable *ConvertedCTFtoLUT;
140 
145  unsigned int NumberOfTableValues;
146 };
147 
148 #endif
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual bool SetNameFromColor(int index)
Set values in the names vector from the colours in the node
vtkColorTransferFunction * ColorTransferFunction
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
void operator=(const vtkMRMLColorNode &)
void UpdateScene(vtkMRMLScene *scene) override
virtual int GetNumberOfColors()
Get the number of colours in the table
void ReadXMLAttributes(const char **atts) override
Set node attributes
static vtkMRMLColorNode * New()
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
void PrintSelf(ostream &os, vtkIndent indent) override
A superclass for other storage nodes.
Abstract MRML node to represent color information.
MRML node to represent procedurally defined color information.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
virtual vtkScalarsToColors * GetScalarsToColors()
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
virtual vtkLookupTable * GetLookupTable()
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Propagate events generated in mrml.
virtual bool GetColor(int ind, double color[4])
virtual const char * GetTypeAsString()
return a text string describing the colour look up table type