Isis 3 Developer Reference
JP2Importer.h
Go to the documentation of this file.
1 #ifndef JP2Importer_h
2 #define JP2Importer_h
3 
27 #include "ImageImporter.h"
28 #include "PixelType.h"
29 
30 namespace Isis {
31  class JP2Decoder;
32 
46  class JP2Importer : public ImageImporter {
47  public:
48  JP2Importer(FileName inputName);
49  virtual ~JP2Importer();
50 
51  virtual bool isGrayscale() const;
52  virtual bool isRgb() const;
53  virtual bool isArgb() const;
54 
55  protected:
56  virtual void updateRawBuffer(int line, int band) const;
57  virtual int getPixel(int s, int l) const;
58 
59  virtual int getGray(int pixel) const;
60  virtual int getRed(int pixel) const;
61  virtual int getGreen(int pixel) const;
62  virtual int getBlue(int pixel) const;
63  virtual int getAlpha(int pixel) const;
64 
65  int getFromBuffer(int s, int b) const;
66 
67  private:
69  JP2Decoder *m_decoder;
70 
72  char **m_buffer;
73 
75  Isis::PixelType m_pixelType;
76  };
77 };
78 
79 
80 #endif
JPEG2000 decoder class.
Definition: JP2Decoder.h:98
virtual bool isRgb() const
Tests to see if the input image is triple-banded, implying RGB (no alpha).
Definition: JP2Importer.cpp:87
virtual int getGreen(int pixel) const
Retrieves the green component of the given pixel from the second band of the input buffer...
Definition: JP2Importer.cpp:178
File name manipulation and expansion.
Definition: FileName.h:116
virtual bool isArgb() const
Tests to see if the input image is quadruple-banded, implying RGBA.
Definition: JP2Importer.cpp:97
virtual int getAlpha(int pixel) const
Retrieves the alpha component of the given pixel from the fourth band of the input buffer...
Definition: JP2Importer.cpp:204
JP2Importer(FileName inputName)
Construct the importer.
Definition: JP2Importer.cpp:17
Imports JPEG 2000 images as Isis cubes.
Definition: JP2Importer.h:46
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:43
virtual int getRed(int pixel) const
Retrieves the red component of the given pixel from the first band of the input buffer.
Definition: JP2Importer.cpp:165
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: JP2Importer.cpp:138
virtual int getBlue(int pixel) const
Retrieves the blue component of the given pixel from the third band of the input buffer.
Definition: JP2Importer.cpp:191
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition: JP2Importer.cpp:152
virtual void updateRawBuffer(int line, int band) const
Updates the buffer used to store chunks of the input data at a time.
Definition: JP2Importer.cpp:110
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual ~JP2Importer()
Destruct the importer.
Definition: JP2Importer.cpp:62
virtual bool isGrayscale() const
Tests to see if the input image is single-banded, implying grayscale (no RGB/A).
Definition: JP2Importer.cpp:77
Imports images with standard formats into Isis as cubes.
Definition: ImageImporter.h:55
int getFromBuffer(int s, int b) const
Retrieves the pixel value from the input buffer corresponding to the given sample and band (the buffe...
Definition: JP2Importer.cpp:219