|
| | JP2Importer (FileName inputName) |
| | Construct the importer.
|
| |
| virtual | ~JP2Importer () |
| | Destruct the importer.
|
| |
| virtual bool | isGrayscale () const |
| | Tests to see if the input image is single-banded, implying grayscale (no RGB/A).
|
| |
| virtual bool | isRgb () const |
| | Tests to see if the input image is triple-banded, implying RGB (no alpha).
|
| |
| virtual bool | isArgb () const |
| | Tests to see if the input image is quadruple-banded, implying RGBA.
|
| |
| void | operator() (Buffer &out) const |
| | The method for processing the output cube in place, called for each line of the output image.
|
| |
| Cube * | import (FileName outputName) |
| | Import the image with default output attributes.
|
| |
| Cube * | import (FileName outputName, CubeAttributeOutput &att) |
| | Import the input image this instance was constructed with into the given output Isis cube with the given output attributes.
|
| |
| void | setNullRange (double min, double max) |
| | Set the range of DN values within which a pixel from the input image will be set to Null in the output.
|
| |
| void | setLrsRange (double min, double max) |
| | Set the range of DN values within which a pixel from the input image will be set to LRS in the output.
|
| |
| void | setHrsRange (double min, double max) |
| | Set the range of DN values within which a pixel from the input image will be set to HRS in the output.
|
| |
| void | setSamples (int s) |
| | Set the sample dimension (width) of the output image.
|
| |
| void | setLines (int l) |
| | Set the line dimension (height) of the output image.
|
| |
| void | setBands (int b) |
| | Set the band dimension (depth) of the output image.
|
| |
| int | samples () const |
| | The sample dimension (width) of the output image.
|
| |
| int | lines () const |
| | The line dimension (height) of the output image.
|
| |
| int | bands () const |
| | The band dimension (depth) of the output image.
|
| |
| FileName | filename () const |
| | The filename of the input image this instance was constructed with.
|
| |
| virtual PvlGroup | convertProjection () const |
| | Pure virtual method for converting projection information in the file being imported to an ISIS Mapping group.
|
| |
|
| virtual void | updateRawBuffer (int line, int band) const |
| | Updates the buffer used to store chunks of the input data at a time.
|
| |
| 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 gray or RGB/A components.
|
| |
| virtual int | getGray (int pixel) const |
| | Retrieves the gray component of the given pixel.
|
| |
| virtual int | getRed (int pixel) const |
| | Retrieves the red component of the given pixel from the first band of the input buffer.
|
| |
| virtual int | getGreen (int pixel) const |
| | Retrieves the green component of the given pixel from the second band of the input buffer.
|
| |
| virtual int | getBlue (int pixel) const |
| | Retrieves the blue component of the given pixel from the third band of the input buffer.
|
| |
| virtual int | getAlpha (int pixel) const |
| | Retrieves the alpha component of the given pixel from the fourth band of the input buffer.
|
| |
| int | getFromBuffer (int s, int b) const |
| | Retrieves the pixel value from the input buffer corresponding to the given sample and band (the buffer contains an entire line).
|
| |
| Cube * | createOutput (FileName outputName, CubeAttributeOutput &att) |
| | Create the output cube from the given filename and attributes.
|
| |
| void | setDefaultBands () |
| | Set the number of bands to be created for the output cube based on the number of color channels in the input image.
|
| |
| double | testSpecial (double pixel) const |
| | Tests a pixel against the Null, HRS, and LRS ranges defined by the importer's handler.
|
| |
| virtual GetChannelMethod | getBandChannel (int band) const |
| | Retrieve the method responsible for fetching the color channel from the input image corresponding to the current band out of output being filled.
|
| |
| virtual int | convertRgbToGray (int pixel) const |
| | Convert the current pixel, taken from an RGB/A image, and blend its RGB components into a single grayscale DN.
|
| |
Imports JPEG 2000 images as Isis cubes.
Takes a JPEG 2000 input image and imports it into Isis in the cube format.
- Author
- 2012-03-16 Travis Addair
| int Isis::ImageImporter::convertRgbToGray |
( |
int | pixel | ) |
const |
|
protectedvirtualinherited |
|
|
protectedvirtualinherited |
Retrieve the method responsible for fetching the color channel from the input image corresponding to the current band out of output being filled.
This will always be the getGray() method for single band output images. For RGB/A images, band 1 will be red, band 2 green, band 3 blue, and band 4 alpha.
- Parameters
-
| band | The current band of the output image |
- Returns
- The method that converts input pixels into the current band's color component
References bands(), getAlpha(), getBlue(), getGray(), getGreen(), and getRed().
Referenced by operator()().
| int Isis::JP2Importer::getFromBuffer |
( |
int | s, |
|
|
int | b ) const |
|
protected |
Retrieves the pixel value from the input buffer corresponding to the given sample and band (the buffer contains an entire line).
Dependent upon the pixel type of the input data.
- Parameters
-
| s | Index into the line buffer corresponding to a sample |
| b | Index into the line buffer corresponding to a band |
- Returns
- The pixel value of the given component
Referenced by getAlpha(), getBlue(), getGray(), getGreen(), and getRed().
| int Isis::JP2Importer::getGray |
( |
int | pixel | ) |
const |
|
protectedvirtual |
Import the input image this instance was constructed with into the given output Isis cube with the given output attributes.
This will do a black-box import using a ProcessByLine routine. The BandBin group will be updated in the output cube with the names of the color channels included. The output cube will be returned on completion of the import process so the caller can continue to modify the labels. The importer instance will retain ownership of this cube, such that the cube handle will be deallocated upon destruction of the importer.
- Parameters
-
| outputName | The filename of the output cube |
| att | The attributes for writing the output cube |
- Returns
- A handle on the newly imported Isis cube owned by the importer
References bands(), Isis::ProcessByBrick::BandsFirst, convertProjection(), createOutput(), Isis::ProcessByBrick::EndProcess(), Isis::Cube::label(), Isis::ProcessByLine::ProcessCubeInPlace(), Isis::ProcessByLine::SetInputCube(), Isis::ProcessByBrick::SetProcessingDirection(), and Isis::Process::WriteHistory().
| void Isis::ImageImporter::operator() |
( |
Buffer & | out | ) |
const |
|
inherited |
The method for processing the output cube in place, called for each line of the output image.
Enables the importer to be used as a functor in a custom ProcessByLine routine, bypassing the black-box import() method entirely. Care should be taken, however, to observe the requirements placed on the structure of such a processing routine by this method. For example, the JP2Importer child requires that the processing proceed in the direction of bands before lines, because its input data is structured in a BIL (band interlaced by line) format.
- Parameters
-
| out | A reference to a line of output data to be written to |
References Isis::Buffer::Band(), getBandChannel(), getPixel(), Isis::Buffer::Line(), Isis::Buffer::SampleDimension(), testSpecial(), and updateRawBuffer().
| void Isis::ImageImporter::setBands |
( |
int | b | ) |
|
|
inherited |
Set the band dimension (depth) of the output image.
Because this importer only works on Grayscale, RGB, and RGBA images, possible values are 1, 3, and 4 for the respective color modes.
- Parameters
-
Referenced by Isis::JP2Importer::JP2Importer(), and setDefaultBands().
| double Isis::ImageImporter::testSpecial |
( |
double | pixel | ) |
const |
|
protectedinherited |
Tests a pixel against the Null, HRS, and LRS ranges defined by the importer's handler.
Any pixel value falling within one of these ranges will be converted into the given type of special pixel. In case of overlapping ranges, these tests will be performed in the order mentioned at the start of this description. By default, these ranges are set such that all incoming pixels will retain their original values.
- Parameters
-
| pixel | The DN value to be tested |
- Returns
- The valid DN or special pixel if it fell within the special ranges
Referenced by operator()().