Isis 3 Programmer Reference
|
Describes how a series of cubes should be exported. More...
#include <ExportDescription.h>
Classes | |
class | ChannelDescription |
Describes how a cube as a single color channel to be exported. More... | |
Public Member Functions | |
ExportDescription () | |
Construct the export description. More... | |
ExportDescription (const ExportDescription &descriptionToCopy) | |
Copy constructor for the export description. More... | |
virtual | ~ExportDescription () |
Destruct the export description. More... | |
ExportDescription & | operator= (const ExportDescription &descriptionToCopy) |
Assignment operator for the export description. More... | |
void | setPixelType (PixelType type) |
Set the pixel type for the output image. More... | |
PixelType | pixelType () const |
Returns the pixel type. More... | |
double | outputPixelNull () const |
Returns the output pixel value for Null DNs. More... | |
double | outputPixelValidMin () const |
Returns the output pixel value for the valid minimum. More... | |
double | outputPixelValidMax () const |
Returns the output pixel value for the valid maximum. More... | |
double | outputPixelAbsoluteMin () const |
Returns the absolute minimum value for output pixels. More... | |
double | outputPixelAbsoluteMax () const |
Returns the absolute maximum value for output pixels. More... | |
int | addChannel (FileName filename, CubeAttributeInput &att) |
Add an export color channel for the given input cube and attributes (typically band number). More... | |
int | addChannel (FileName filename, CubeAttributeInput &att, double min, double max) |
Add an export color channel for the given input cube, attributes (typically band number), and input DN range. More... | |
const ChannelDescription & | channel (int i) const |
Return the channels description at the given index. More... | |
int | channelCount () const |
Count of the number of channels in the description. More... | |
Private Attributes | |
PixelType | m_type |
Pixel type to export the data to, defaults to None. More... | |
double | m_outputPixelNull |
Value to which Null DNs will be mapped in the exported image file, defaults to 0.0. More... | |
double | m_outputPixelValidMin |
Value to which minimum valid DNs will be mapped in the exported image file, defaults to 0.0. More... | |
double | m_outputPixelValidMax |
Value to which maximum valid DNs will be mapped in the exported image file, defaults to 255.0. More... | |
double | m_outputPixelAbsoluteMin |
The smallest allowed pixel value in the exported image file. More... | |
double | m_outputPixelAbsoluteMax |
The largest allowed pixel value in the exported image file. More... | |
QList< ChannelDescription * > * | m_channels |
List of color channels to be exported into the output image. More... | |
Describes how a series of cubes should be exported.
This container class encapsulates the parameters required to specify how an Isis cube should be exported to a standard image format. This encapsulation is useful to applications like "isis2std" for passing its user parameters down to processing classes such as ImageExporters without needing to create new method signatures that take a growing list of parameters. The ExportDescription contains top-level data about the export as a whole, such as bit type. It also contains a list of ChannelDescriptions, each describing the input cubes, attributes, and DN ranges for a channel of color information (gray, red, blue, green, or alpha).
2012-04-04 Travis Addair - Added documentation.
2013-06-05 Jeannie Backer - Modified valid min/max for signed and unsigned word pixel types since the exported images do not care about Isis special pixel DNs. Change ouput null/min/max member variable names for clarity. Added absolute min/max member variables and accessors. Added copy constructor and assignment operator. References #1380.
Definition at line 59 of file ExportDescription.h.
Isis::ExportDescription::ExportDescription | ( | ) |
Construct the export description.
Definition at line 17 of file ExportDescription.cpp.
References m_channels, m_outputPixelAbsoluteMax, m_outputPixelAbsoluteMin, m_outputPixelNull, m_outputPixelValidMax, m_outputPixelValidMin, and m_type.
Isis::ExportDescription::ExportDescription | ( | const ExportDescription & | descriptionToCopy | ) |
Copy constructor for the export description.
descriptionToCopy | ExportDescription to be copied. |
Definition at line 35 of file ExportDescription.cpp.
References addChannel(), Isis::ExportDescription::ChannelDescription::attributes(), channel(), channelCount(), Isis::ExportDescription::ChannelDescription::filename(), Isis::ExportDescription::ChannelDescription::hasCustomRange(), Isis::ExportDescription::ChannelDescription::inputMaximum(), Isis::ExportDescription::ChannelDescription::inputMinimum(), m_channels, m_type, and setPixelType().
|
virtual |
Destruct the export description.
Also deletes the list of channels.
Definition at line 88 of file ExportDescription.cpp.
References m_channels.
int Isis::ExportDescription::addChannel | ( | FileName | filename, |
CubeAttributeInput & | att | ||
) |
Add an export color channel for the given input cube and attributes (typically band number).
filename | The name of the cube |
att | The cube attributes such as band number |
Definition at line 207 of file ExportDescription.cpp.
References m_channels.
Referenced by ExportDescription(), and operator=().
int Isis::ExportDescription::addChannel | ( | FileName | filename, |
CubeAttributeInput & | att, | ||
double | min, | ||
double | max | ||
) |
Add an export color channel for the given input cube, attributes (typically band number), and input DN range.
filename | The name of the cube |
att | The cube attributes such as band number |
min | The minimum DN in the input mapped to the minimum of the output |
max | The maximum DN in the input mapped to the maximum of the output |
Definition at line 225 of file ExportDescription.cpp.
References m_channels, and Isis::ExportDescription::ChannelDescription::setInputRange().
const ExportDescription::ChannelDescription & Isis::ExportDescription::channel | ( | int | i | ) | const |
Return the channels description at the given index.
i | Index of the desired channel |
Definition at line 242 of file ExportDescription.cpp.
Referenced by ExportDescription(), and operator=().
int Isis::ExportDescription::channelCount | ( | ) | const |
Count of the number of channels in the description.
Definition at line 253 of file ExportDescription.cpp.
References m_channels.
Referenced by ExportDescription(), and operator=().
ExportDescription & Isis::ExportDescription::operator= | ( | const ExportDescription & | descriptionToCopy | ) |
Assignment operator for the export description.
descriptionToCopy | ExportDescription to be copied. |
Definition at line 61 of file ExportDescription.cpp.
References addChannel(), Isis::ExportDescription::ChannelDescription::attributes(), channel(), channelCount(), Isis::ExportDescription::ChannelDescription::filename(), Isis::ExportDescription::ChannelDescription::hasCustomRange(), Isis::ExportDescription::ChannelDescription::inputMaximum(), Isis::ExportDescription::ChannelDescription::inputMinimum(), m_channels, m_type, and setPixelType().
double Isis::ExportDescription::outputPixelAbsoluteMax | ( | ) | const |
Returns the absolute maximum value for output pixels.
Defaults to 255.0 if not set by the user.
Definition at line 193 of file ExportDescription.cpp.
References m_outputPixelAbsoluteMax.
double Isis::ExportDescription::outputPixelAbsoluteMin | ( | ) | const |
Returns the absolute minimum value for output pixels.
Defaults to 0.0 if not set by the user.
Definition at line 183 of file ExportDescription.cpp.
References m_outputPixelAbsoluteMin.
double Isis::ExportDescription::outputPixelNull | ( | ) | const |
Returns the output pixel value for Null DNs.
Defaults to 0.0 if not set by the user.
Definition at line 153 of file ExportDescription.cpp.
References m_outputPixelNull.
double Isis::ExportDescription::outputPixelValidMax | ( | ) | const |
Returns the output pixel value for the valid maximum.
Defaults to 255.0 if not set by the user.
Definition at line 173 of file ExportDescription.cpp.
References m_outputPixelValidMax.
double Isis::ExportDescription::outputPixelValidMin | ( | ) | const |
Returns the output pixel value for the valid minimum.
Defaults to 0.0 if not set by the user.
Definition at line 163 of file ExportDescription.cpp.
References m_outputPixelValidMin.
PixelType Isis::ExportDescription::pixelType | ( | ) | const |
Returns the pixel type.
Defaults to None if not set by the user.
Definition at line 143 of file ExportDescription.cpp.
References m_type.
Referenced by Isis::QtExporter::initialize().
void Isis::ExportDescription::setPixelType | ( | PixelType | type | ) |
Set the pixel type for the output image.
Automatically establishes valid output minimum, maximum, and null values based on the type.
type | The pixel type: {UnsignedByte, SignedWord, UnsignedWord} |
Definition at line 101 of file ExportDescription.cpp.
References _FILEINFO_, m_outputPixelAbsoluteMax, m_outputPixelAbsoluteMin, m_outputPixelNull, m_outputPixelValidMax, m_outputPixelValidMin, m_type, Isis::IException::Programmer, and Isis::toString().
Referenced by ExportDescription(), and operator=().
|
private |
List of color channels to be exported into the output image.
Definition at line 143 of file ExportDescription.h.
Referenced by addChannel(), channelCount(), ExportDescription(), operator=(), and ~ExportDescription().
|
private |
The largest allowed pixel value in the exported image file.
This is the same as the value to which maximum DNs are mapped.
Definition at line 138 of file ExportDescription.h.
Referenced by ExportDescription(), outputPixelAbsoluteMax(), and setPixelType().
|
private |
The smallest allowed pixel value in the exported image file.
This is the same as the value to which Null DNs are mapped.
Definition at line 135 of file ExportDescription.h.
Referenced by ExportDescription(), outputPixelAbsoluteMin(), and setPixelType().
|
private |
Value to which Null DNs will be mapped in the exported image file, defaults to 0.0.
Definition at line 129 of file ExportDescription.h.
Referenced by ExportDescription(), outputPixelNull(), and setPixelType().
|
private |
Value to which maximum valid DNs will be mapped in the exported image file, defaults to 255.0.
Definition at line 133 of file ExportDescription.h.
Referenced by ExportDescription(), outputPixelValidMax(), and setPixelType().
|
private |
Value to which minimum valid DNs will be mapped in the exported image file, defaults to 0.0.
Definition at line 131 of file ExportDescription.h.
Referenced by ExportDescription(), outputPixelValidMin(), and setPixelType().
|
private |
Pixel type to export the data to, defaults to None.
Definition at line 127 of file ExportDescription.h.
Referenced by ExportDescription(), operator=(), pixelType(), and setPixelType().