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 
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 =========================================================================*/
00029 #ifndef __vtkJPEGWriter_h
00030 #define __vtkJPEGWriter_h
00031 
00032 #include "vtkImageWriter.h"
00033 
00034 class vtkUnsignedCharArray;
00035 class vtkImageData;
00036 
00037 class VTK_IO_EXPORT vtkJPEGWriter : public vtkImageWriter
00038 {
00039 public:
00040   static vtkJPEGWriter *New();
00041   vtkTypeRevisionMacro(vtkJPEGWriter,vtkImageWriter);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045   virtual void Write();
00046 
00048 
00049   vtkSetClampMacro(Quality, int, 0, 100);
00050   vtkGetMacro(Quality, int);
00052 
00054 
00055   vtkSetMacro(Progressive, unsigned int);
00056   vtkGetMacro(Progressive, unsigned int);
00057   vtkBooleanMacro(Progressive, unsigned int);
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   vtkJPEGWriter();
00076   ~vtkJPEGWriter();
00077   
00078   void WriteSlice(vtkImageData *data);
00079 
00080 private:
00081   int Quality;
00082   unsigned int Progressive;
00083   unsigned int WriteToMemory;
00084   vtkUnsignedCharArray *Result;
00085   FILE *TempFP;
00086   
00087 private:
00088   vtkJPEGWriter(const vtkJPEGWriter&);  // Not implemented.
00089   void operator=(const vtkJPEGWriter&);  // Not implemented.
00090 };
00091 
00092 #endif
00093 
00094