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 "vtkIOImageModule.h" // For export macro
33 #include "vtkImageWriter.h"
34 
36 class vtkImageData;
37 
39 {
40 public:
41  static vtkJPEGWriter *New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46  virtual void Write();
47 
49 
50  vtkSetClampMacro(Quality, int, 0, 100);
51  vtkGetMacro(Quality, int);
53 
55 
56  vtkSetMacro(Progressive, unsigned int);
57  vtkGetMacro(Progressive, unsigned int);
58  vtkBooleanMacro(Progressive, unsigned int);
60 
62 
63  vtkSetMacro(WriteToMemory, unsigned int);
64  vtkGetMacro(WriteToMemory, unsigned int);
65  vtkBooleanMacro(WriteToMemory, unsigned int);
67 
69 
71  virtual void SetResult(vtkUnsignedCharArray*);
72  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
74 
75 protected:
76  vtkJPEGWriter();
77  ~vtkJPEGWriter();
78 
79  void WriteSlice(vtkImageData *data, int* uExtent);
80 
81 private:
82  int Quality;
83  unsigned int Progressive;
84  unsigned int WriteToMemory;
85  vtkUnsignedCharArray *Result;
86  FILE *TempFP;
87 
88 private:
89  vtkJPEGWriter(const vtkJPEGWriter&); // Not implemented.
90  void operator=(const vtkJPEGWriter&); // Not implemented.
91 };
92 
93 #endif
94 
95 
Writes JPEG files.
Definition: vtkJPEGWriter.h:38
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual void Write()
Writes images to files.
static vtkImageWriter * New()
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKIOIMAGE_EXPORT