Isis Developer Reference
QtImporter.h
Go to the documentation of this file.
1 #ifndef QtImporter_h
2 #define QtImporter_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 
11 #include "ImageImporter.h"
12 
13 class QImage;
14 
15 namespace Isis {
39  class QtImporter : public ImageImporter {
40  public:
41  QtImporter(FileName inputName);
42  virtual ~QtImporter();
43 
44  virtual bool isGrayscale() const;
45  virtual bool isRgb() const;
46  virtual bool isArgb() const;
47 
48  protected:
49  virtual void updateRawBuffer(int line, int band) const;
50  virtual int getPixel(int s, int l) const;
51 
52  virtual int getGray(int pixel) const;
53  virtual int getRed(int pixel) const;
54  virtual int getGreen(int pixel) const;
55  virtual int getBlue(int pixel) const;
56  virtual int getAlpha(int pixel) const;
57 
58  private:
60  QImage *m_qimage;
61  };
62 };
63 
64 
65 #endif
FileName.h
Isis::QtImporter::~QtImporter
virtual ~QtImporter()
Destruct the importer.
Definition: QtImporter.cpp:44
Isis::ImageImporter::setSamples
void setSamples(int s)
Set the sample dimension (width) of the output image.
Definition: ImageImporter.cpp:241
Isis::QtImporter::isArgb
virtual bool isArgb() const
Tests to see if the input image is has an alpha channel, implying RGBA.
Definition: QtImporter.cpp:76
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::QtImporter::getAlpha
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel.
Definition: QtImporter.cpp:162
Isis::ImageImporter
Imports images with standard formats into Isis as cubes.
Definition: ImageImporter.h:39
QtImporter.h
Isis::QtImporter::isGrayscale
virtual bool isGrayscale() const
Tests to see if the input image is grayscale (no RGB/A).
Definition: QtImporter.cpp:55
IString.h
Isis::QtImporter::getBlue
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel.
Definition: QtImporter.cpp:150
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::QtImporter::QtImporter
QtImporter(FileName inputName)
Construct the importer.
Definition: QtImporter.cpp:24
Isis::ImageImporter::setDefaultBands
void setDefaultBands()
Set the number of bands to be created for the output cube based on the number of color channels in th...
Definition: ImageImporter.cpp:192
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::QtImporter::getGray
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition: QtImporter.cpp:114
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ImageImporter::setLines
void setLines(int l)
Set the line dimension (height) of the output image.
Definition: ImageImporter.cpp:251
Isis::QtImporter::isRgb
virtual bool isRgb() const
Tests to see if the input image is neither grayscale nor has an alpha channel, implying RGB (no alpha...
Definition: QtImporter.cpp:66
IException.h
Isis::QtImporter::getPixel
virtual int getPixel(int s, int l) const
Returns a representation of a pixel for the input format that can then be broken down into specific g...
Definition: QtImporter.cpp:102
Isis::QtImporter::getGreen
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel.
Definition: QtImporter.cpp:138
ImageImporter.h
Isis::QtImporter
Imports a series of standard image formats with Qt facilities.
Definition: QtImporter.h:39
Isis::QtImporter::updateRawBuffer
virtual void updateRawBuffer(int line, int band) const
Does nothing as Qt reads the entire input image into memory, and therefore does not need to be update...
Definition: QtImporter.cpp:88
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::QtImporter::getRed
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel.
Definition: QtImporter.cpp:126