--- vtkWindowToImageFilter.cxx.orig	2004-09-30 11:30:00.000000000 -0400
+++ vtkWindowToImageFilter.cxx	2004-10-04 10:30:13.000000000 -0400
@@ -29,6 +29,7 @@
   this->Input = NULL;
   this->Magnification = 1;
   this->ReadFrontBuffer = 1;
+  this->ReadRGBA = 0;
 }
 
 //----------------------------------------------------------------------------
@@ -68,6 +69,7 @@
     os << indent << "Input: (none)\n";
     }
   os << indent << "ReadFrontBuffer: " << this->ReadFrontBuffer << "\n";
+  os << indent << "ReadRGBA: " << this->ReadRGBA << "\n";
   os << indent << "Magnification: " << this->Magnification << "\n";
 }
 
@@ -97,7 +99,15 @@
   out->SetOrigin(0.0, 0.0, 0.0);
   
   // set the scalar components
-  out->SetNumberOfScalarComponents(3);
+  if( this->ReadRGBA )
+    {
+      out->SetNumberOfScalarComponents(4);
+    }
+  else
+    {
+      out->SetNumberOfScalarComponents(3);
+    }
+  
   out->SetScalarType(VTK_UNSIGNED_CHAR);
 }
 
@@ -127,9 +137,18 @@
   // get the size of the render window
   size[0] = this->Input->GetSize()[0];
   size[1] = this->Input->GetSize()[1];
-  rowSize = size[0]*3;
-  outIncrY = size[0]*this->Magnification*3;
-    
+
+  if( this->ReadRGBA)
+    {
+      rowSize = size[0]*4;
+      outIncrY = size[0]*this->Magnification*4;
+    }
+  else
+    {
+      rowSize = size[0]*3;
+      outIncrY = size[0]*this->Magnification*3;
+    }
+
   float *viewAngles;
   double *windowCenters;
   vtkRenderWindow *renWin = vtkRenderWindow::SafeDownCast(this->Input);
@@ -231,8 +250,16 @@
         buffer = 1;
         }      
 
-      pixels = this->Input->GetPixelData(0,0,size[0] - 1,
-                                         size[1] - 1, buffer);
+      if( this->ReadRGBA )
+	{
+	  pixels = renWin->GetRGBACharPixelData(0,0,size[0] - 1,
+					     size[1] - 1, buffer);
+	}
+      else
+	{
+	  pixels = this->Input->GetPixelData(0,0,size[0] - 1,
+					     size[1] - 1, buffer);
+	}
       unsigned char *pixels1 = pixels;
       
       // now write the data to the output image
--- vtkWindowToImageFilter.h.orig	2004-09-30 11:30:10.000000000 -0400
+++ vtkWindowToImageFilter.h	2004-09-30 11:32:47.000000000 -0400
@@ -72,6 +72,13 @@
   vtkBooleanMacro(ReadFrontBuffer, int);
   vtkGetMacro(ReadFrontBuffer, int);
   vtkSetMacro(ReadFrontBuffer, int);
+  // Description
+  // Set/Get the flag that determines whether to read RGBA data
+  // Default is no (Read only RGB Data)
+  vtkBooleanMacro(ReadRGBA, int);
+  vtkGetMacro(ReadRGBA, int);
+  vtkSetMacro(ReadRGBA, int);
+
   
 protected:
   vtkWindowToImageFilter();
@@ -81,6 +88,7 @@
   vtkWindow *Input;
   int Magnification;
   int ReadFrontBuffer;
+  int ReadRGBA;
   void ExecuteInformation();
   void ExecuteData(vtkDataObject *data);
 private:
