IO/vtkJPEGWriter.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00046 #ifndef __vtkJPEGWriter_h
    00047 #define __vtkJPEGWriter_h
    00048
    00049 #include "vtkImageWriter.h"
    00050
    00051 class vtkUnsignedCharArray;
    00052 class vtkImageData;
    00053
    00054 class VTK_IO_EXPORT vtkJPEGWriter : public vtkImageWriter
    00055 {
    00056 public:
    00057   static vtkJPEGWriter *New();
    00058   vtkTypeRevisionMacro(vtkJPEGWriter,vtkImageWriter);
    00059   void PrintSelf(ostream& os, vtkIndent indent);
    00060
    00062   virtual void Write();
    00063
    00065
    00066   vtkSetClampMacro(Quality, int, 0, 100);
    00067   vtkGetMacro(Quality, int);
    00069
    00071
    00072   vtkSetMacro(Progressive, unsigned int);
    00073   vtkGetMacro(Progressive, unsigned int);
    00074   vtkBooleanMacro(Progressive, unsigned int);
    00076
    00078
    00079   vtkSetMacro(WriteToMemory, unsigned int);
    00080   vtkGetMacro(WriteToMemory, unsigned int);
    00081   vtkBooleanMacro(WriteToMemory, unsigned int);
    00083
    00085
    00087   virtual void SetResult(vtkUnsignedCharArray*);
    00088   vtkGetObjectMacro(Result, vtkUnsignedCharArray);
    00090
    00091 protected:
    00092   vtkJPEGWriter();
    00093   ~vtkJPEGWriter();
    00094
    00095   void WriteSlice(vtkImageData *data);
    00096
    00097 private:
    00098   int Quality;
    00099   unsigned int Progressive;
    00100   unsigned int WriteToMemory;
    00101   vtkUnsignedCharArray *Result;
    00102
    00103 private:
    00104   vtkJPEGWriter(const vtkJPEGWriter&);  // Not implemented.
    00105   void operator=(const vtkJPEGWriter&);  // Not implemented.
    00106 };
    00107
    00108 #endif
    00109
    00110