Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkFSLookupTable.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 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 =========================================================================auto=*/
9 
10 #ifndef __vtkFSLookupTable_h
11 #define __vtkFSLookupTable_h
12 
13 #include <FreeSurferConfigure.h>
14 #include "vtkFreeSurferExport.h"
15 
16 // VTK includes
17 #include <vtkLookupTable.h>
18 
22 class VTK_FreeSurfer_EXPORT vtkFSLookupTable : public vtkLookupTable
23 {
24 public:
25  static vtkFSLookupTable *New();
26  vtkTypeMacro(vtkFSLookupTable,vtkLookupTable);
27  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
28 
29  // Description:
30  // Copy the contents from another LookupTable
31  void DeepCopy(vtkScalarsToColors *lut) VTK_OVERRIDE;
32 
33  vtkGetMacro(LowThresh,float);
34  vtkSetMacro(LowThresh,float);
35 
36  vtkGetMacro(HiThresh,float);
37  vtkSetMacro(HiThresh,float);
38 
39  vtkGetMacro(LutType,int);
42  const char *GetLutTypeString();
46  void SetLutTypeToLabels();
47  void SetLutTypeToHeat();
48  void SetLutTypeToBlueRed();
49  void SetLutTypeToRedBlue();
50  void SetLutTypeToRedGreen();
51  void SetLutTypeToGreenRed();
52 
53  vtkGetMacro(Reverse,int);
54  vtkSetMacro(Reverse,int);
55  vtkBooleanMacro(Reverse,int);
56 
57  vtkGetMacro(Truncate,int);
58  vtkSetMacro(Truncate,int);
59  vtkBooleanMacro(Truncate,int);
60 
61  vtkGetMacro(Offset,float);
62  vtkSetMacro(Offset,float);
63 
64  vtkGetMacro(Slope,float);
65  vtkSetMacro(Slope,float);
66 
67  vtkGetMacro(Blufact,float);
68  vtkSetMacro(Blufact,float);
69 
70  vtkGetMacro(FMid,float);
71  vtkSetMacro(FMid,float);
72 
75  double *GetRange() VTK_OVERRIDE;
79  using vtkLookupTable::SetRange;
80  void SetRange(double, double) VTK_OVERRIDE;
84  const unsigned char *MapValue(double val) VTK_OVERRIDE;
87  void GetColor(double, double[3]) VTK_OVERRIDE;
91  void MapScalarsThroughTable2(void* input, unsigned char* output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement) VTK_OVERRIDE;
92 
95  enum
96  {
97  FSLUTLABELS = 0,
98  FSLUTHEAT = 1,
99  FSLUTBLUERED = 2,
100  FSLUTREDBLUE = 3,
101  FSLUTREDGREEN = 4,
102  FSLUTGREENRED = 5,
103  };
104 
105  // Description:
106  // Get the number of available colors for mapping to.
107  virtual vtkIdType GetNumberOfAvailableColors() VTK_OVERRIDE;
108 protected:
110  ~vtkFSLookupTable();
111 
116  float LowThresh;
121  float HiThresh;
122 
126  int LutType;
127 
131  int Reverse;
132 
136  int Truncate;
137 
140  float Offset;
141 
144  float Slope;
145 
148  float Blufact;
149 
153  float FMid;
154 
157  unsigned char RGBA[4];
158 };
159 
160 #endif
A look up table for FreeSurfer colour scales.