File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
JP2Importer.h
Go to the documentation of this file.
1 #ifndef JP2Importer_h
2 #define JP2Importer_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 
11 #include "ImageImporter.h"
12 #include "PixelType.h"
13 
14 namespace Isis {
15  class JP2Decoder;
16 
30  class JP2Importer : public ImageImporter {
31  public:
32  JP2Importer(FileName inputName);
33  virtual ~JP2Importer();
34 
35  virtual bool isGrayscale() const;
36  virtual bool isRgb() const;
37  virtual bool isArgb() const;
38 
39  protected:
40  virtual void updateRawBuffer(int line, int band) const;
41  virtual int getPixel(int s, int l) const;
42 
43  virtual int getGray(int pixel) const;
44  virtual int getRed(int pixel) const;
45  virtual int getGreen(int pixel) const;
46  virtual int getBlue(int pixel) const;
47  virtual int getAlpha(int pixel) const;
48 
49  int getFromBuffer(int s, int b) const;
50 
51  private:
53  JP2Decoder *m_decoder;
54 
56  char **m_buffer;
57 
59  Isis::PixelType m_pixelType;
60  };
61 };
62 
63 
64 #endif
Isis::SizeOf
int SizeOf(Isis::PixelType pixelType)
Returns the number of bytes of the specified PixelType.
Definition: PixelType.h:46
Isis::JP2Decoder::GetSampleDimension
int GetSampleDimension() const
Definition: JP2Decoder.h:97
Isis::JP2Importer::getGreen
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:184
Isis::JP2Decoder::GetPixelBytes
int GetPixelBytes() const
Definition: JP2Decoder.h:112
FileName.h
Isis::ImageImporter::convertRgbToGray
virtual int convertRgbToGray(int pixel) const
Convert the current pixel, taken from an RGB/A image, and blend its RGB components into a single gray...
Definition: ImageImporter.cpp:399
Isis::ImageImporter::setSamples
void setSamples(int s)
Set the sample dimension (width) of the output image.
Definition: ImageImporter.cpp:241
Isis::JP2Decoder::OpenFile
void OpenFile()
Open the JPEG2000 file.
Definition: JP2Decoder.cpp:52
Isis::JP2Importer::isArgb
virtual bool isArgb() const
Tests to see if the input image is quadruple-banded, implying RGBA.
Definition: JP2Importer.cpp:103
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::JP2Decoder::Read
void Read(unsigned char **inbuf)
Read data from JP2 file containing 8-bit data.
Definition: JP2Decoder.cpp:168
Isis::JP2Importer::getAlpha
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:210
Isis::UnsignedWord
@ UnsignedWord
Definition: PixelType.h:31
Isis::JP2Importer
Imports JPEG 2000 images as Isis cubes.
Definition: JP2Importer.h:30
Isis::ImageImporter
Imports images with standard formats into Isis as cubes.
Definition: ImageImporter.h:39
Isis::JP2Importer::JP2Importer
JP2Importer(FileName inputName)
Construct the importer.
Definition: JP2Importer.cpp:23
Isis::SignedWord
@ SignedWord
Definition: PixelType.h:32
Isis::JP2Decoder::GetLineDimension
int GetLineDimension() const
Definition: JP2Decoder.h:102
ProcessImport.h
Isis::JP2Decoder::GetSignedData
bool GetSignedData() const
Definition: JP2Decoder.h:117
Isis::JP2Importer::getRed
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:171
Isis::ImageImporter::bands
int bands() const
The band dimension (depth) of the output image.
Definition: ImageImporter.cpp:298
Isis::JP2Decoder::GetBandDimension
int GetBandDimension() const
Definition: JP2Decoder.h:107
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
PixelType.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::ImageImporter::samples
int samples() const
The sample dimension (width) of the output image.
Definition: ImageImporter.cpp:278
Isis::JP2Importer::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: JP2Importer.cpp:144
Isis::ImageImporter::setBands
void setBands(int b)
Set the band dimension (depth) of the output image.
Definition: ImageImporter.cpp:263
Isis::JP2Importer::getGray
virtual int getGray(int pixel) const
Retrieves the gray component of the given pixel.
Definition: JP2Importer.cpp:158
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::JP2Importer::getBlue
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:197
Isis::JP2Decoder
JPEG2000 decoder class.
Definition: JP2Decoder.h:83
JP2Importer.h
Isis::PixelType
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::ImageImporter::filename
FileName filename() const
The filename of the input image this instance was constructed with.
Definition: ImageImporter.cpp:308
Isis::JP2Importer::~JP2Importer
virtual ~JP2Importer()
Destruct the importer.
Definition: JP2Importer.cpp:68
Isis::JP2Importer::updateRawBuffer
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:116
JP2Decoder.h
ImageImporter.h
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::JP2Importer::isGrayscale
virtual bool isGrayscale() const
Tests to see if the input image is single-banded, implying grayscale (no RGB/A).
Definition: JP2Importer.cpp:83
Isis::UnsignedByte
@ UnsignedByte
Definition: PixelType.h:29
Isis::JP2Importer::getFromBuffer
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:225
Isis::JP2Importer::isRgb
virtual bool isRgb() const
Tests to see if the input image is triple-banded, implying RGB (no alpha).
Definition: JP2Importer.cpp:93
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

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 03/21/2022 06:50:57