Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLFreeSurferProceduralColorNode.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: vtkMRMLFreeSurferProceduralColorNode.h,v $
10  Date: $Date: 2006/03/19 17:12:28 $
11  Version: $Revision: 1.0 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLFreeSurferProceduralColorNode_h
16 #define __vtkMRMLFreeSurferProceduralColorNode_h
17 
19 class vtkFSLookupTable;
20 
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 "FreeSurferProceduralColor";};
55 
58  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
59 
63  vtkLookupTable *GetLookupTable() VTK_OVERRIDE;
64  vtkFSLookupTable *GetFSLookupTable();
65  virtual void SetLookupTable(vtkFSLookupTable* newLookupTable);
66  virtual vtkScalarsToColors* GetScalarsToColors() VTK_OVERRIDE;
67 
70  void SetType(int type) VTK_OVERRIDE;
71  void SetTypeToHeat();
72  void SetTypeToBlueRed();
73  void SetTypeToRedBlue();
74  void SetTypeToRedGreen();
75  void SetTypeToGreenRed();
76  void SetTypeToLabels();
77  void SetTypeToCustom();
78 
79  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) VTK_OVERRIDE;
80 
83 
91  enum
92  {
93  Heat = 1,
94  BlueRed = 2,
95  RedBlue = 3,
96  RedGreen = 4,
97  GreenRed = 5,
98  Labels = 6,
99  Custom = 7
100  };
101 
105  int GetFirstType() VTK_OVERRIDE { return this->Heat; };
106  int GetLastType () VTK_OVERRIDE { return this->GreenRed; };
107 
110  const char * GetTypeAsString() VTK_OVERRIDE;
111 
114  enum
115  {
116  DisplayModifiedEvent = 20000
117  };
118 
121  vtkGetStringMacro(LabelsFileName);
122  vtkSetStringMacro(LabelsFileName);
123 
124  virtual int GetNumberOfColors() VTK_OVERRIDE;
125  virtual bool GetColor(int entry, double color[4]) VTK_OVERRIDE;
126 
127 protected:
129  ~vtkMRMLFreeSurferProceduralColorNode();
130  vtkMRMLFreeSurferProceduralColorNode(const vtkMRMLFreeSurferProceduralColorNode&);
131  void operator=(const vtkMRMLFreeSurferProceduralColorNode&);
132 
136  bool SetNameFromColor(int index) VTK_OVERRIDE;
137 
140  vtkFSLookupTable *LookupTable;
141 
142  char *LabelsFileName;
143 };
144 
145 #endif
virtual vtkLookupTable * GetLookupTable() VTK_OVERRIDE
virtual const char * GetTypeAsString() VTK_OVERRIDE
return a text string describing the colour look up table type
virtual vtkScalarsToColors * GetScalarsToColors() VTK_OVERRIDE
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
static vtkMRMLProceduralColorNode * New()
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
MRMLNode methods.
MRML node to represent FreeSurfer color information.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
A look up table for FreeSurfer colour scales.
MRML node to represent procedurally defined color information.
virtual int GetNumberOfColors() VTK_OVERRIDE
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
alternative method to propagate events generated in Storage nodes
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual void SetType(int type)
Set Type to type, then build colours and set names.