Isis 3 Programmer Reference
QtExporter.h
Go to the documentation of this file.
1 #ifndef QtExporter_h
2 #define QtExporter_h
3 
27 #include "ImageExporter.h"
28 
29 #include "Constants.h"
30 
31 class QImage;
32 
33 namespace Isis {
63  class QtExporter : public ImageExporter {
64  public:
65  QtExporter(QString format);
66  virtual ~QtExporter();
67 
68  virtual void setGrayscale(ExportDescription &desc);
69  virtual void setRgb(ExportDescription &desc);
70  virtual void setRgba(ExportDescription &desc);
71 
72  virtual void write(FileName outputName, int quality=100,
73  QString compression="none");
74 
75  static bool canWriteFormat(QString format);
76 
77  protected:
78  virtual void writeGrayscale(vector<Buffer *> &in) const;
79  virtual void writeRgb(vector<Buffer *> &in) const;
80  virtual void writeRgba(vector<Buffer *> &in) const;
81 
83 
84  private:
85  void initialize(ExportDescription &desc);
86 
88  QImage *m_qimage;
89 
91  QString m_format;
92  };
93 };
94 
95 
96 #endif
long long int BigInt
Big int.
Definition: Constants.h:65
void checkDataSize(BigInt samples, BigInt lines, int bands)
Checks that the data size for an image of the desired dimensions will be less than 2GB...
Definition: QtExporter.cpp:219
File name manipulation and expansion.
Definition: FileName.h:116
int bands() const
Number of bands (channels) in the output image.
Export Isis cubes into standard formats.
Definition: ImageExporter.h:70
int samples() const
Number of samples (columns) in the output image.
virtual ~QtExporter()
Destruct the exporter.
Definition: QtExporter.cpp:42
QImage * m_qimage
Structure holding all output image data in memory.
Definition: QtExporter.h:88
virtual void write(FileName outputName, int quality=100, QString compression="none")
Let the base ImageExporter handle the generic black-box writing routine, then save the image to disk...
Definition: QtExporter.cpp:193
virtual void writeRgba(vector< Buffer *> &in) const
Write a line of RGBA data to the output image.
Definition: QtExporter.cpp:167
virtual void setRgba(ExportDescription &desc)
Set the input with the description generically, check the data size for a four-band image with the es...
Definition: QtExporter.cpp:107
virtual void setRgb(ExportDescription &desc)
Set the input with the description generically, check the data size for a three-band image with the e...
Definition: QtExporter.cpp:93
QtExporter(QString format)
Construct the Qt exporter.
Definition: QtExporter.cpp:21
virtual void setGrayscale(ExportDescription &desc)
Set the input with the description generically, check the data size for a single-band image with the ...
Definition: QtExporter.cpp:71
static bool canWriteFormat(QString format)
Returns true if the format is supported by QImageWriter.
Definition: QtExporter.cpp:240
Describes how a series of cubes should be exported.
virtual void writeGrayscale(vector< Buffer *> &in) const
Write a line of grayscale data to the output image.
Definition: QtExporter.cpp:119
int lines() const
Number of lines (rows) in the output image.
virtual void writeRgb(vector< Buffer *> &in) const
Write a line of RGB data to the output image.
Definition: QtExporter.cpp:146
QString m_format
The lowercase abbreviated format of the output image.
Definition: QtExporter.h:91
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void initialize(ExportDescription &desc)
Generic initialization with the export description.
Definition: QtExporter.cpp:53
Exports cubes into one of several formats with Qt facilities.
Definition: QtExporter.h:63