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

IO/vtkJPEGWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkJPEGWriter.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00047 #ifndef __vtkJPEGWriter_h
00048 #define __vtkJPEGWriter_h
00049 
00050 #include "vtkImageWriter.h"
00051 
00052 class vtkUnsignedCharArray;
00053 class vtkImageData;
00054 
00055 class VTK_IO_EXPORT vtkJPEGWriter : public vtkImageWriter
00056 {
00057 public:
00058   static vtkJPEGWriter *New();
00059   vtkTypeRevisionMacro(vtkJPEGWriter,vtkImageWriter);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00063   virtual void Write();
00064 
00066 
00067   vtkSetClampMacro(Quality, int, 0, 100);
00068   vtkGetMacro(Quality, int);
00070 
00072 
00073   vtkSetMacro(Progressive, unsigned int);
00074   vtkGetMacro(Progressive, unsigned int);
00075   vtkBooleanMacro(Progressive, unsigned int);
00077   
00079 
00080   vtkSetMacro(WriteToMemory, unsigned int);
00081   vtkGetMacro(WriteToMemory, unsigned int);
00082   vtkBooleanMacro(WriteToMemory, unsigned int);
00084   
00086 
00088   virtual void SetResult(vtkUnsignedCharArray*);
00089   vtkGetObjectMacro(Result, vtkUnsignedCharArray);
00091   
00092 protected:
00093   vtkJPEGWriter();
00094   ~vtkJPEGWriter();
00095   
00096   void WriteSlice(vtkImageData *data);
00097 
00098 private:
00099   int Quality;
00100   unsigned int Progressive;
00101   unsigned int WriteToMemory;
00102   vtkUnsignedCharArray *Result;
00103   
00104 private:
00105   vtkJPEGWriter(const vtkJPEGWriter&);  // Not implemented.
00106   void operator=(const vtkJPEGWriter&);  // Not implemented.
00107 };
00108 
00109 #endif
00110 
00111