Isis 3.0 Developer's Reference (API) |
Home |
Manipulate and parse attributes of output cube filenames. More...
#include <CubeAttribute.h>
Inherits Isis::CubeAttribute.
Public Member Functions | |
CubeAttributeOutput () | |
Constructs an empty CubeAttributeOutput. | |
CubeAttributeOutput (const Isis::iString &att) | |
Constructs a CubeAttributeOutput and initialized it with the contents of the string parameter. | |
~CubeAttributeOutput () | |
Destroys the object. | |
bool | PropagatePixelType () const |
Return true if the pixel type is to be propagated from an input cube. | |
bool | PropagateMinimumMaximum () const |
Return true if the min/max are to be propagated from an input cube. | |
void | Set (const std::string &att) |
Set the output attributes according to the argument. | |
void | Reset () |
Set the output attributes to the default state. | |
std::string | FileFormatStr () const |
Return the file format as a string. | |
Cube::Format | FileFormat () const |
Return the file format an Cube::Format. | |
void | Format (const Cube::Format &fmt) |
Set the format to the fmt parameter. | |
std::string | ByteOrderStr () const |
Return the byte order as a string. | |
Isis::ByteOrder | ByteOrder () const |
Return the byte order as an Isis::ByteOrder. | |
void | Order (const Isis::ByteOrder order) |
Set the order according to the parameter order. | |
double | Minimum () const |
Return the output cube attribute minimum. | |
double | Maximum () const |
Return the output cube attribute maximum. | |
void | Minimum (const double min) |
Set the output cube attribute minimum. | |
void | Maximum (const double max) |
Set the output cube attribute maximum. | |
Isis::PixelType | PixelType () const |
Return the pixel type as an Isis::PixelType. | |
void | Label (Isis::LabelAttachment attachment) |
Set the label attachment type to the parameter value. | |
bool | AttachedLabel () const |
Return true if the attachement type is "Attached". | |
bool | DetachedLabel () const |
Return true if the attachement type is "Detached". | |
void | PixelType (const Isis::PixelType type) |
Set the pixel type to that given by the parameter. | |
void | Write (std::ostream &ostr) const |
Write the output attributes to a stream. | |
void | Write (std::string &str) const |
Write the output attributes to a string. | |
void | Write (Isis::Pvl &pvl) const |
Write the output attributes to a Pvl. | |
Protected Attributes | |
Isis::iString | p_attribute |
Contains the unparsed attributes with the filename stripped. |
Manipulate and parse attributes of output cube filenames.
This class provides parsing and manipulation of attributes associated with output cube filenames. Output cube filenames can have an attributes of "minimum:maximum", "pixel type", "file format", "byte order", and "label placement"
Isis::CubeAttributeOutput::CubeAttributeOutput | ( | ) |
Constructs an empty CubeAttributeOutput.
Isis::CubeAttributeOutput::CubeAttributeOutput | ( | const Isis::iString & | att | ) |
Constructs a CubeAttributeOutput and initialized it with the contents of the string parameter.
The string is parased to obtain any min/max, pixel type, byte order, file format or label placement. Any attribute information that is not valie for an output cube will throw an error.
att | A string containing the file attributes. All characters before the first "+" are assumed to be the filename and are ignored. |
References Isis::CubeAttribute::p_attribute.
Isis::CubeAttributeOutput::~CubeAttributeOutput | ( | ) |
Destroys the object.
bool Isis::CubeAttributeOutput::AttachedLabel | ( | ) | const [inline] |
Return true if the attachement type is "Attached".
References Isis::AttachedLabel.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), and Isis::Process::SetOutputCube().
Isis::ByteOrder Isis::CubeAttributeOutput::ByteOrder | ( | ) | const |
Return the byte order as an Isis::ByteOrder.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), and Isis::Process::SetOutputCube().
string Isis::CubeAttributeOutput::ByteOrderStr | ( | ) | const |
bool Isis::CubeAttributeOutput::DetachedLabel | ( | ) | const [inline] |
Return true if the attachement type is "Detached".
References Isis::DetachedLabel.
Cube::Format Isis::CubeAttributeOutput::FileFormat | ( | ) | const |
Return the file format an Cube::Format.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), and Isis::Process::SetOutputCube().
string Isis::CubeAttributeOutput::FileFormatStr | ( | ) | const |
void Isis::CubeAttributeOutput::Format | ( | const Cube::Format & | fmt | ) |
Set the format to the fmt parameter.
void Isis::CubeAttributeOutput::Label | ( | Isis::LabelAttachment | attachment | ) | [inline] |
Set the label attachment type to the parameter value.
void Isis::CubeAttributeOutput::Maximum | ( | const double | max | ) |
Set the output cube attribute maximum.
References Isis::RangeSet.
double Isis::CubeAttributeOutput::Maximum | ( | ) | const |
Return the output cube attribute maximum.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCube().
void Isis::CubeAttributeOutput::Minimum | ( | const double | min | ) |
Set the output cube attribute minimum.
References Isis::RangeSet.
double Isis::CubeAttributeOutput::Minimum | ( | ) | const |
Return the output cube attribute minimum.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCube().
void Isis::CubeAttributeOutput::Order | ( | const Isis::ByteOrder | order | ) |
Set the order according to the parameter order.
void Isis::CubeAttributeOutput::PixelType | ( | const Isis::PixelType | type | ) |
Set the pixel type to that given by the parameter.
References Isis::None.
Isis::PixelType Isis::CubeAttributeOutput::PixelType | ( | ) | const |
Return the pixel type as an Isis::PixelType.
References _FILEINFO_, Isis::iException::Message(), Isis::None, and Isis::iException::Programmer.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCube().
bool Isis::CubeAttributeOutput::PropagateMinimumMaximum | ( | ) | const [inline] |
Return true if the min/max are to be propagated from an input cube.
References Isis::PropagateRange.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCube().
bool Isis::CubeAttributeOutput::PropagatePixelType | ( | ) | const [inline] |
Return true if the pixel type is to be propagated from an input cube.
Referenced by Isis::GuiOutputAttribute::SetAttributes(), Isis::ProcessImport::SetOutputCube(), and Isis::Process::SetOutputCube().
void Isis::CubeAttributeOutput::Reset | ( | ) |
Set the output attributes to the default state.
void Isis::CubeAttributeOutput::Set | ( | const std::string & | att | ) |
Set the output attributes according to the argument.
Note: the attributes are not initialized prior to parsing the argument. This means that multipal invocations will be cumulative.
att | A string containing the file attributes. All characters before the first "+" are assumed to be the filename and are ignored. |
void Isis::CubeAttributeOutput::Write | ( | Isis::Pvl & | pvl | ) | const [virtual] |
Write the output attributes to a Pvl.
Reimplemented from Isis::CubeAttribute.
References Isis::PvlObject::AddGroup(), ByteOrderStr(), FileFormatStr(), Isis::LabelAttachmentName(), Isis::PixelTypeName(), and Isis::Real.
void Isis::CubeAttributeOutput::Write | ( | std::string & | str | ) | const [virtual] |
Write the output attributes to a string.
Reimplemented from Isis::CubeAttribute.
References ByteOrderStr(), FileFormatStr(), Isis::LabelAttachmentName(), Isis::None, Isis::PixelTypeName(), and Isis::Real.
void Isis::CubeAttributeOutput::Write | ( | std::ostream & | ostr | ) | const [virtual] |
Write the output attributes to a stream.
Reimplemented from Isis::CubeAttribute.
References st.
Referenced by Isis::GuiOutputAttribute::GetAttributes().
Isis::iString Isis::CubeAttribute::p_attribute [protected, inherited] |
Contains the unparsed attributes with the filename stripped.
Referenced by Isis::CubeAttribute::CubeAttribute(), Isis::CubeAttributeInput::CubeAttributeInput(), CubeAttributeOutput(), and Isis::CubeAttribute::Write().