VTK
vtkJPEGWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkJPEGWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef __vtkJPEGWriter_h
30 #define __vtkJPEGWriter_h
31 
32 #include "vtkImageWriter.h"
33 
35 class vtkImageData;
36 
38 {
39 public:
40  static vtkJPEGWriter *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45  virtual void Write();
46 
48 
49  vtkSetClampMacro(Quality, int, 0, 100);
50  vtkGetMacro(Quality, int);
52 
54 
55  vtkSetMacro(Progressive, unsigned int);
56  vtkGetMacro(Progressive, unsigned int);
57  vtkBooleanMacro(Progressive, unsigned int);
59 
61 
62  vtkSetMacro(WriteToMemory, unsigned int);
63  vtkGetMacro(WriteToMemory, unsigned int);
64  vtkBooleanMacro(WriteToMemory, unsigned int);
66 
68 
70  virtual void SetResult(vtkUnsignedCharArray*);
71  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
73 
74 protected:
75  vtkJPEGWriter();
76  ~vtkJPEGWriter();
77 
78  void WriteSlice(vtkImageData *data);
79 
80 private:
81  int Quality;
82  unsigned int Progressive;
83  unsigned int WriteToMemory;
84  vtkUnsignedCharArray *Result;
85  FILE *TempFP;
86 
87 private:
88  vtkJPEGWriter(const vtkJPEGWriter&); // Not implemented.
89  void operator=(const vtkJPEGWriter&); // Not implemented.
90 };
91 
92 #endif
93 
94