[vtkusers] bug (and patch) for bug in CVS vtkWindowLevelLookupTable.h

Charl P. Botha c.p.botha at its.tudelft.nl
Fri Jun 1 18:23:10 EDT 2001


Dear VTKers,

There's a bug in the latest CVS checkouts of vtkWindowLevelLookupTable.  In
SetLevel() you have "this->Window = level" instead of "this->Level = level".
As you can imagine, this results in a non-usable vtkWindowLevelLookupTable.
I have attached the trivial patch for this.

In addition, there is still that for-scope variable re-use bug in
vtkCell3D.cxx as well.  I've attached that trivial patch too.

Please apply these.

Regards,

-- 
charl p. botha      | computer graphics and cad/cam 
http://cpbotha.net/ | http://www.cg.its.tudelft.nl/
-------------- next part --------------
--- vtkWindowLevelLookupTable.h.orig	Tue May 29 21:10:09 2001
+++ vtkWindowLevelLookupTable.h	Sat Jun  2 00:07:27 2001
@@ -88,7 +88,7 @@
   // Set the Level for the lookup table.  The level is the average of
   // TableRange[0] and TableRange[1].
   void SetLevel(float level) {
-    this->Window = level;
+    this->Level = level;
     this->SetTableRange(this->Level - this->Window/2.0,
 			this->Level + this->Window/2.0); };
   vtkGetMacro(Level,float);
-------------- next part --------------
--- vtkCell3D.cxx.orig	Tue May 29 14:28:06 2001
+++ vtkCell3D.cxx	Tue May 29 14:28:28 2001
@@ -133,7 +133,7 @@
       this->Points->GetPoint(edges[0],p1);
   
     this->Points->GetPoint(edges[1],p2);
-      for (i=0; i<3; i++)
+      for (int i=0; i<3; i++)
         {
         x[i] = p1[i] + t * (p2[i] - p1[i]);
         }


More information about the vtkusers mailing list