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

vtkJPEGWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkJPEGWriter.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 =========================================================================*/
00043 #ifndef __vtkJPEGWriter_h
00044 #define __vtkJPEGWriter_h
00045 
00046 #include "vtkImageWriter.h"
00047 
00048 class vtkUnsignedCharArray;
00049 class vtkImageData;
00050 
00051 class VTK_IO_EXPORT vtkJPEGWriter : public vtkImageWriter
00052 {
00053 public:
00054   static vtkJPEGWriter *New();
00055   vtkTypeRevisionMacro(vtkJPEGWriter,vtkImageWriter);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059   virtual void Write();
00060 
00062 
00063   vtkSetClampMacro(Quality, int, 0, 100);
00064   vtkGetMacro(Quality, int);
00066 
00068 
00069   vtkSetMacro(Progressive, unsigned int);
00070   vtkGetMacro(Progressive, unsigned int);
00071   vtkBooleanMacro(Progressive, unsigned int);
00073   
00075 
00076   vtkSetMacro(WriteToMemory, unsigned int);
00077   vtkGetMacro(WriteToMemory, unsigned int);
00078   vtkBooleanMacro(WriteToMemory, unsigned int);
00080   
00082 
00084   virtual void SetResult(vtkUnsignedCharArray*);
00085   vtkGetObjectMacro(Result, vtkUnsignedCharArray);
00087   
00088 protected:
00089   vtkJPEGWriter();
00090   ~vtkJPEGWriter();
00091   
00092   void WriteSlice(vtkImageData *data);
00093 
00094 private:
00095   int Quality;
00096   unsigned int Progressive;
00097   unsigned int WriteToMemory;
00098   vtkUnsignedCharArray *Result;
00099   FILE *TempFP;
00100   
00101 private:
00102   vtkJPEGWriter(const vtkJPEGWriter&);  // Not implemented.
00103   void operator=(const vtkJPEGWriter&);  // Not implemented.
00104 };
00105 
00106 #endif
00107 
00108