Isis 3 Programmer Reference
Isis::ExportDescription Class Reference

Describes how a series of cubes should be exported. More...

#include <ExportDescription.h>

Collaboration diagram for Isis::ExportDescription:
Collaboration graph

Classes

class  ChannelDescription
 Describes how a cube as a single color channel to be exported. More...
 

Public Member Functions

 ExportDescription ()
 Construct the export description.
 
 ExportDescription (const ExportDescription &descriptionToCopy)
 Copy constructor for the export description.
 
virtual ~ExportDescription ()
 Destruct the export description.
 
ExportDescriptionoperator= (const ExportDescription &descriptionToCopy)
 Assignment operator for the export description.
 
void setPixelType (PixelType type)
 Set the pixel type for the output image.
 
PixelType pixelType () const
 Returns the pixel type.
 
double outputPixelNull () const
 Returns the output pixel value for Null DNs.
 
double outputPixelValidMin () const
 Returns the output pixel value for the valid minimum.
 
double outputPixelValidMax () const
 Returns the output pixel value for the valid maximum.
 
double outputPixelAbsoluteMin () const
 Returns the absolute minimum value for output pixels.
 
double outputPixelAbsoluteMax () const
 Returns the absolute maximum value for output pixels.
 
int addChannel (FileName filename, CubeAttributeInput &att)
 Add an export color channel for the given input cube and attributes (typically band number).
 
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.
 
const ChannelDescriptionchannel (int i) const
 Return the channels description at the given index.
 
int channelCount () const
 Count of the number of channels in the description.
 

Private Attributes

PixelType m_type
 Pixel type to export the data to, defaults to None.
 
double m_outputPixelNull
 Value to which Null DNs will be mapped in the exported image file, defaults to 0.0.
 
double m_outputPixelValidMin
 Value to which minimum valid DNs will be mapped in the exported image file, defaults to 0.0.
 
double m_outputPixelValidMax
 Value to which maximum valid DNs will be mapped in the exported image file, defaults to 255.0.
 
double m_outputPixelAbsoluteMin
 The smallest allowed pixel value in the exported image file.
 
double m_outputPixelAbsoluteMax
 The largest allowed pixel value in the exported image file.
 
QList< ChannelDescription * > * m_channels
 List of color channels to be exported into the output image.
 

Detailed Description

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).

Author
2012-04-03 Travis Addair
History

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 43 of file ExportDescription.h.

Constructor & Destructor Documentation

◆ ExportDescription() [1/2]

Isis::ExportDescription::ExportDescription ( )

◆ ExportDescription() [2/2]

Isis::ExportDescription::ExportDescription ( const ExportDescription & descriptionToCopy)

Copy constructor for the export description.

Parameters
descriptionToCopyExportDescription to be copied.

Definition at line 40 of file ExportDescription.cpp.

References addChannel(), channel(), m_channels, and setPixelType().

◆ ~ExportDescription()

Isis::ExportDescription::~ExportDescription ( )
virtual

Destruct the export description.

Also deletes the list of channels.

Definition at line 93 of file ExportDescription.cpp.

References m_channels.

Member Function Documentation

◆ addChannel() [1/2]

int Isis::ExportDescription::addChannel ( FileName filename,
CubeAttributeInput & att )

Add an export color channel for the given input cube and attributes (typically band number).

Parameters
filenameThe name of the cube
attThe cube attributes such as band number
Returns
The index of the newly added channel

Definition at line 212 of file ExportDescription.cpp.

References m_channels.

Referenced by ExportDescription(), and operator=().

◆ addChannel() [2/2]

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.

Parameters
filenameThe name of the cube
attThe cube attributes such as band number
minThe minimum DN in the input mapped to the minimum of the output
maxThe maximum DN in the input mapped to the maximum of the output
Returns
The index of the newly added channel

Definition at line 230 of file ExportDescription.cpp.

References m_channels.

◆ channel()

const ExportDescription::ChannelDescription & Isis::ExportDescription::channel ( int i) const

Return the channels description at the given index.

Parameters
iIndex of the desired channel
Returns
Constant reference to the channel

Definition at line 247 of file ExportDescription.cpp.

Referenced by Isis::ImageExporter::addChannel(), ExportDescription(), and operator=().

◆ channelCount()

int Isis::ExportDescription::channelCount ( ) const

Count of the number of channels in the description.

Returns
The channel count

Definition at line 258 of file ExportDescription.cpp.

References m_channels.

Referenced by Isis::ImageExporter::initializeProcess().

◆ operator=()

ExportDescription & Isis::ExportDescription::operator= ( const ExportDescription & descriptionToCopy)

Assignment operator for the export description.

Parameters
descriptionToCopyExportDescription to be copied.
Returns
ExportDescription with same number of channels, type, and pixel values.

Definition at line 66 of file ExportDescription.cpp.

References addChannel(), channel(), m_channels, and setPixelType().

◆ outputPixelAbsoluteMax()

double Isis::ExportDescription::outputPixelAbsoluteMax ( ) const

Returns the absolute maximum value for output pixels.

Defaults to 255.0 if not set by the user.

Returns
The absolute maximum

Definition at line 198 of file ExportDescription.cpp.

References m_outputPixelAbsoluteMax.

Referenced by Isis::ImageExporter::initializeProcess().

◆ outputPixelAbsoluteMin()

double Isis::ExportDescription::outputPixelAbsoluteMin ( ) const

Returns the absolute minimum value for output pixels.

Defaults to 0.0 if not set by the user.

Returns
The absolute minimum

Definition at line 188 of file ExportDescription.cpp.

References m_outputPixelAbsoluteMin.

Referenced by Isis::ImageExporter::initializeProcess().

◆ outputPixelNull()

double Isis::ExportDescription::outputPixelNull ( ) const

Returns the output pixel value for Null DNs.

Defaults to 0.0 if not set by the user.

Returns
The output Null

Definition at line 158 of file ExportDescription.cpp.

References m_outputPixelNull.

Referenced by Isis::ImageExporter::initializeProcess().

◆ outputPixelValidMax()

double Isis::ExportDescription::outputPixelValidMax ( ) const

Returns the output pixel value for the valid maximum.

Defaults to 255.0 if not set by the user.

Returns
The valid maximum

Definition at line 178 of file ExportDescription.cpp.

References m_outputPixelValidMax.

Referenced by Isis::ImageExporter::initializeProcess().

◆ outputPixelValidMin()

double Isis::ExportDescription::outputPixelValidMin ( ) const

Returns the output pixel value for the valid minimum.

Defaults to 0.0 if not set by the user.

Returns
The valid minimum

Definition at line 168 of file ExportDescription.cpp.

References m_outputPixelValidMin.

Referenced by Isis::ImageExporter::initializeProcess().

◆ pixelType()

PixelType Isis::ExportDescription::pixelType ( ) const

Returns the pixel type.

Defaults to None if not set by the user.

Returns
The pixel type: {None, UnsignedByte, SignedWord, UnsignedWord}

Definition at line 148 of file ExportDescription.cpp.

References m_type.

Referenced by Isis::ImageExporter::pixelType().

◆ setPixelType()

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.

Parameters
typeThe pixel type: {UnsignedByte, SignedWord, UnsignedWord}

Definition at line 106 of file ExportDescription.cpp.

References m_outputPixelAbsoluteMax, m_outputPixelAbsoluteMin, m_outputPixelNull, m_outputPixelValidMax, m_outputPixelValidMin, m_type, Isis::IException::Programmer, and Isis::toString().

Referenced by ExportDescription(), and operator=().

Member Data Documentation

◆ m_channels

QList<ChannelDescription *>* Isis::ExportDescription::m_channels
private

List of color channels to be exported into the output image.

Definition at line 127 of file ExportDescription.h.

Referenced by addChannel(), addChannel(), channelCount(), ExportDescription(), ExportDescription(), operator=(), and ~ExportDescription().

◆ m_outputPixelAbsoluteMax

double Isis::ExportDescription::m_outputPixelAbsoluteMax
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 122 of file ExportDescription.h.

Referenced by ExportDescription(), outputPixelAbsoluteMax(), and setPixelType().

◆ m_outputPixelAbsoluteMin

double Isis::ExportDescription::m_outputPixelAbsoluteMin
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 119 of file ExportDescription.h.

Referenced by ExportDescription(), outputPixelAbsoluteMin(), and setPixelType().

◆ m_outputPixelNull

double Isis::ExportDescription::m_outputPixelNull
private

Value to which Null DNs will be mapped in the exported image file, defaults to 0.0.

Definition at line 113 of file ExportDescription.h.

Referenced by ExportDescription(), outputPixelNull(), and setPixelType().

◆ m_outputPixelValidMax

double Isis::ExportDescription::m_outputPixelValidMax
private

Value to which maximum valid DNs will be mapped in the exported image file, defaults to 255.0.

Definition at line 117 of file ExportDescription.h.

Referenced by ExportDescription(), outputPixelValidMax(), and setPixelType().

◆ m_outputPixelValidMin

double Isis::ExportDescription::m_outputPixelValidMin
private

Value to which minimum valid DNs will be mapped in the exported image file, defaults to 0.0.

Definition at line 115 of file ExportDescription.h.

Referenced by ExportDescription(), outputPixelValidMin(), and setPixelType().

◆ m_type

PixelType Isis::ExportDescription::m_type
private

Pixel type to export the data to, defaults to None.

Definition at line 111 of file ExportDescription.h.

Referenced by ExportDescription(), pixelType(), and setPixelType().


The documentation for this class was generated from the following files: