Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPNGWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPNGWriter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00042 #ifndef __vtkPNGWriter_h
00043 #define __vtkPNGWriter_h
00044 
00045 #include "vtkImageWriter.h"
00046 
00047 class vtkImageData;
00048 class vtkUnsignedCharArray;
00049 
00050 class VTK_IO_EXPORT vtkPNGWriter : public vtkImageWriter
00051 {
00052 public:
00053   static vtkPNGWriter *New();
00054   vtkTypeRevisionMacro(vtkPNGWriter,vtkImageWriter);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058   virtual void Write();
00059 
00061 
00062   vtkSetMacro(WriteToMemory, unsigned int);
00063   vtkGetMacro(WriteToMemory, unsigned int);
00064   vtkBooleanMacro(WriteToMemory, unsigned int);
00066   
00068 
00070   virtual void SetResult(vtkUnsignedCharArray*);
00071   vtkGetObjectMacro(Result, vtkUnsignedCharArray);
00073 
00074 protected:
00075   vtkPNGWriter();
00076   ~vtkPNGWriter();
00077   
00078   void WriteSlice(vtkImageData *data);
00079   unsigned int WriteToMemory;
00080   vtkUnsignedCharArray *Result;
00081   FILE *TempFP;
00082   
00083 private:
00084   vtkPNGWriter(const vtkPNGWriter&);  // Not implemented.
00085   void operator=(const vtkPNGWriter&);  // Not implemented.
00086 };
00087 
00088 #endif
00089 
00090