Commit 5d74a091 authored by Ken Martin's avatar Ken Martin
Browse files

sneak in a double change on the weekend

parent 384c14cb
......@@ -17,7 +17,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkWindowLevelLookupTable, "1.19");
vtkCxxRevisionMacro(vtkWindowLevelLookupTable, "1.20");
vtkStandardNewMacro(vtkWindowLevelLookupTable);
vtkWindowLevelLookupTable::vtkWindowLevelLookupTable(int sze, int ext)
......@@ -28,15 +28,15 @@ vtkWindowLevelLookupTable::vtkWindowLevelLookupTable(int sze, int ext)
this->InverseVideo = 0;
this->MinimumTableValue[0] = 0.0f;
this->MinimumTableValue[1] = 0.0f;
this->MinimumTableValue[2] = 0.0f;
this->MinimumTableValue[3] = 1.0f;
this->MinimumTableValue[0] = 0.0;
this->MinimumTableValue[1] = 0.0;
this->MinimumTableValue[2] = 0.0;
this->MinimumTableValue[3] = 1.0;
this->MaximumTableValue[0] = 1.0f;
this->MaximumTableValue[1] = 1.0f;
this->MaximumTableValue[2] = 1.0f;
this->MaximumTableValue[3] = 1.0f;
this->MaximumTableValue[0] = 1.0;
this->MaximumTableValue[1] = 1.0;
this->MaximumTableValue[2] = 1.0;
this->MaximumTableValue[3] = 1.0;
this->MinimumColor[0] = 0;
this->MinimumColor[1] = 0;
......@@ -59,7 +59,7 @@ void vtkWindowLevelLookupTable::Build()
{
int i, j;
unsigned char *rgba;
float start[4], incr[4];
double start[4], incr[4];
for (j = 0; j < 4; j++)
{
......
......@@ -50,21 +50,21 @@ public:
// Description:
// Set the window for the lookup table. The window is the difference
// between TableRange[0] and TableRange[1].
void SetWindow(float window) {
void SetWindow(double window) {
if (window < 1e-5f) { window = 1e-5f; }
this->Window = window;
this->SetTableRange(this->Level - this->Window/2.0f,
this->Level + this->Window/2.0f); };
vtkGetMacro(Window,float);
vtkGetMacro(Window,double);
// Description:
// Set the Level for the lookup table. The level is the average of
// TableRange[0] and TableRange[1].
void SetLevel(float level) {
void SetLevel(double level) {
this->Level = level;
this->SetTableRange(this->Level - this->Window/2.0f,
this->Level + this->Window/2.0f); };
vtkGetMacro(Level,float);
vtkGetMacro(Level,double);
// Description:
// Set inverse video on or off. You can achieve the same effect by
......@@ -77,15 +77,15 @@ public:
// Set the minimum table value. All lookup table entries below the
// start of the ramp will be set to this color. After you change
// this value, you must re-build the lookup table.
vtkSetVector4Macro(MinimumTableValue,float);
vtkGetVector4Macro(MinimumTableValue,float);
vtkSetVector4Macro(MinimumTableValue,double);
vtkGetVector4Macro(MinimumTableValue,double);
// Description:
// Set the maximum table value. All lookup table entries above the
// end of the ramp will be set to this color. After you change
// this value, you must re-build the lookup table.
vtkSetVector4Macro(MaximumTableValue,float);
vtkGetVector4Macro(MaximumTableValue,float);
vtkSetVector4Macro(MaximumTableValue,double);
vtkGetVector4Macro(MaximumTableValue,double);
// Description:
// For backwards compatibility: specify the color using integers
......@@ -125,11 +125,11 @@ protected:
vtkWindowLevelLookupTable(int sze=256, int ext=256);
~vtkWindowLevelLookupTable() {};
float Window;
float Level;
double Window;
double Level;
int InverseVideo;
float MaximumTableValue[4];
float MinimumTableValue[4];
double MaximumTableValue[4];
double MinimumTableValue[4];
unsigned char MinimumColor[4];
unsigned char MaximumColor[4];
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment