USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::Cube Class Reference
[Low Level Cube I/O]

IO Handler for Isis Cubes. More...

#include <Cube.h>

List of all members.

Public Types

enum  Format { Bsq, Tile }
 

These are the possible storage formats of Isis3 cubes.

More...

Public Member Functions

 Cube ()
 Constructs a Cube object.
virtual ~Cube ()
 Destroys the Cube object.
bool isOpen () const
 Test if a cube file has been opened/created.
bool isProjected () const
 Returns true if the labels of the cube appear to have a valid mapping group.
bool isReadOnly () const
 Test if the opened cube is read-only, that is write operations will fail if this is true.
bool isReadWrite () const
 Test if the opened cube is read-write, that is read and write operations should succeed if this is true.
bool labelsAttached () const
 Test if labels are attached.
void close (bool remove=false)
 Closes the cube and updates the labels.
void create (const iString &cfile)
 This method will create an isis cube for writing.
void open (const iString &cfile, iString access="r")
 This method will open an isis sube for reading or reading/writing.
void reopen (iString access="r")
 This method will reopen an isis sube for reading or reading/writing.
void read (Blob &blob) const
 This method will read data from the specified Blob object.
void read (Buffer &rbuf)
 This method will read a buffer of data from the cube as specified by the contents of the Buffer object.
void write (Blob &blob)
 This method will write a blob of data (e.g.
void write (Buffer &wbuf)
 This method will write a buffer of data from the cube as specified by the contents of the Buffer object.
void setBaseMultiplier (double base, double mult)
 Used prior to the Create method, this will specify the base and multiplier for converting 8-bit/16-bit back and forth between 32-bit:

\[ 32-bit pixel = 8-bit/16-bit pixel * multiplier + base \]

.

void setMinMax (double min, double max)
 Used prior to the Create method, this will compute a good base and multiplier value given the minimum/maximum range of the 32bit data.
void setByteOrder (ByteOrder byteOrder)
 Used prior to the Create method, this will specify the byte order of pixels, either least or most significant byte.
void setDimensions (int ns, int nl, int nb)
 Used prior to the Create method to specify the size of the cube.
void setFormat (Format format)
 Used prior to the Create method, this will specify the format of the cube, either band, sequential or tiled.
void setLabelsAttached (bool attached)
 Use prior to calling create, this sets whether or not to use separate label and data files.
void setLabelSize (int labelBytes)
 Used prior to the Create method, this will allocate a specific number of bytes in the label area for attached files.
void setPixelType (PixelType pixelType)
 Used prior to the Create method, this will specify the output pixel type.
void setVirtualBands (const QList< iString > &vbands)
 This allows the programmer to specify a subset of bands to work with.
void setVirtualBands (const std::vector< std::string > &vbands)
 This is a deprecated version of setVirtualBands(const QList<iString> &).
int getBandCount () const
 Returns the number of virtual bands for the cube.
double getBase () const
 Returns the base value for converting 8-bit/16-bit pixels to 32-bit.
ByteOrder getByteOrder () const
 Returns the byte order/endian-ness of the cube file.
CameragetCamera ()
 Return a camera associated with the cube.
iString getFilename () const
 Returns the opened cube's filename.
Format getFormat () const
HistogramgetHistogram (const int &band=1, iString msg="Gathering histogram")
 This method returns a pointer to a Histogram object which allows the program to obtain and use various statistics and histogram information from the cube.
HistogramgetHistogram (const int &band, const double &validMin, const double &validMax, iString msg="Gathering histogram")
 This method returns a pointer to a Histogram object which allows the program to obtain and use various statistics and histogram information from the cube.
PvlgetLabel () const
 Returns a pointer to the IsisLabel object associated with the cube.
int getLabelSize (bool actual=false) const
 Returns the number of bytes used by the label.
int getLineCount () const
double getMultiplier () const
 Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit.
PixelType getPixelType () const
int getPhysicalBand (const int &virtualBand) const
 This method will return the physical band number given a virtual band number.
ProjectiongetProjection ()
int getSampleCount () const
StatisticsgetStatistics (const int &band=1, iString msg="Gathering statistics")
 This method returns a pointer to a Statistics object which allows the program to obtain and use various statistics from the cube.
StatisticsgetStatistics (const int &band, const double &validMin, const double &validMax, iString msg="Gathering statistics")
 This method returns a pointer to a Statistics object which allows the program to obtain and use various statistics from the cube.
void addCachingAlgorithm (CubeCachingAlgorithm *)
 This will add the given caching algorithm to the list of attempted caching algorithms.
void clearIoCache ()
 This will clear excess RAM used for quicker IO in the cube.
bool deleteBlob (iString BlobType, iString BlobName)
 This method will delete a blob label object from the cube as specified by the Blob type and name.
void deleteGroup (const iString &group)
 Deletes a group from the cube labels.
PvlGroupgetGroup (const iString &group) const
 Read a group from the cube into a Label.
bool hasGroup (const iString &group) const
 Return if the cube has a specified group in the labels.
bool hasTable (const iString &name)
 Check to see if the cube contains a pvl table by the provided name.
void putGroup (PvlGroup &group)
 Adds a group in a Label to the cube.

Detailed Description

IO Handler for Isis Cubes.

This class is used to open, create, read, and write data from Isis cube files.

Author:
2003-02-14 Jeff Anderson

Member Enumeration Documentation

These are the possible storage formats of Isis3 cubes.

There is an internal IO handler for each one of these.

Enumerator:
Bsq 

Cubes are stored in band-sequential format, that is the order of the pixels in the file (on disk) is:.

     S1,L1,B1
     S2,L1,B1
     and so on until ...
     SN,L1,B1
     S1,L2,B1
     and so on until ...
     S1,LN,B1
     S1,L1,B2
     S2,L1,B2
     and so on until ...
     S1,L1,BN
   

The idea is the cubes are stored left-to-right, top-to-bottom, then front-to-back.

Tile 

Cubes are stored in tile format, that is the order of the pixels in the file (on disk) is BSQ within a given sub-area defined by the Tile IO handler.

Typically these tiles are around 1MB for efficiency.

The idea is the cubes are stored left-to-right, top-to-bottom inside the tiles (which have 1 band). The tiles are themselves in BSQ order also. Please note that this can cause cubes to be larger on disk due to the tile size not being evenly divisible into the cube size.

Cube:

 ------------------------------
 |Tile *Tile *Tile *Tile *Tile|*
 |  0  *  1  *  2  *  3  *  4 |*
 |     *     *     *     *    |*
 |****************************|*
 |Tile *Tile *Tile *Tile *Tile|*
 |  5  *  6  *  7  *  8  *  9 |*
 |     *     *     *     *    |*
 |****************************|*
 |Tile *Tile *Tile *Tile *Tile|*
 ------------------------------*
 * 10  * 11  * 12  * 13  * 14  *
 *******************************
 

The symbol '*' denotes tile boundaries. The symbols '-' and '|' denote cube boundaries.


Constructor & Destructor Documentation

Cube::Cube (  ) 

Constructs a Cube object.

Cube::~Cube (  )  [virtual]

Destroys the Cube object.

References close().


Member Function Documentation

void Cube::addCachingAlgorithm ( CubeCachingAlgorithm algorithm  ) 

This will add the given caching algorithm to the list of attempted caching algorithms.

The algorithms are tried in the opposite order that they were added - the first algorithm added is the last algorithm tried.

RegionalCachingAlgorithm is the only initial caching algorithm and works well for most cases. The caching algorithm only apply to the opened Cube and is reset by any changes to the open status of the Cube.

This method takes ownership of algorithm.

Parameters:
algorithm The caching algorithm to add to the Cube for I/O

References _FILEINFO_, Isis::CubeIoHandler::addCachingAlgorithm(), isOpen(), Isis::iException::Message(), and Isis::iException::Programmer.

Referenced by Isis::Sensor::Sensor(), and Isis::ProcessMapMosaic::SetOutputCube().

void Cube::clearIoCache (  ) 

This will clear excess RAM used for quicker IO in the cube.

This should only be called if you need hundreds of cubes opened simultaneously. The IO cache will start growing again on future IO's.

References Isis::CubeIoHandler::clearCache().

void Cube::close ( bool  removeIt = false  ) 

Closes the cube and updates the labels.

Optionally, it deletes the cube if requested.

Parameters:
removeIt (Default value = false) Indicates if the file should be removed/deleted.

References isOpen(), and isReadWrite().

Referenced by Isis::ImageOverlapSet::FindImageOverlaps(), reopen(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Chip::Write(), and ~Cube().

void Cube::create ( const iString cubeFilename  ) 

This method will create an isis cube for writing.

The programmer should make appropriate calls to Set methods before invoking Create. If none are made there are internal defaults which are:

        Dimensions     512x512x1
        PixelType      Real
        ByteOrder      Matches architecture of host machine
        Attached       From user preference file
        Label Size     65536 bytes
        Format         Tiled
        Base           0.0
        Multiplier     1.0
Parameters:
cubeFilename Name of the cube file to open. If the extenstion ".cub" is not given it will be appended (i.e., the extension of .cub is forced). Environment variables in the filename will be automatically expanded as well.

References _FILEINFO_, Isis::Filename::AddExtension(), Isis::PvlObject::AddGroup(), Isis::PvlObject::AddObject(), Bsq, Isis::ByteOrderName(), core(), Isis::Filename::Expanded(), Isis::PvlObject::FindGroup(), Isis::iException::Io, isOpen(), Isis::iException::Message(), Isis::Filename::Name(), Isis::PixelTypeName(), Isis::Preference::Preferences(), Isis::iException::Programmer, Isis::ReadWrite, Isis::Filename::RemoveExtension(), size, Isis::SizeOf(), Isis::CubeIoHandler::updateLabels(), and Isis::iException::User.

Referenced by Isis::Process::SetOutputCube(), and Isis::Chip::Write().

bool Cube::deleteBlob ( iString  BlobType,
iString  BlobName 
)

This method will delete a blob label object from the cube as specified by the Blob type and name.

If blob does not exist it will do nothing and return false.

Parameters:
BlobType type of blob to search for (Polygon, Table, etc)
BlobName blob to be deleted
Returns:
boolean if it found the blob and deleted it.

References Isis::PvlObject::DeleteObject(), Isis::PvlObject::FindKeyword(), Isis::PvlContainer::Name(), Isis::PvlObject::Object(), and Isis::PvlObject::Objects().

void Cube::deleteGroup ( const iString group  ) 

Deletes a group from the cube labels.

If the group does not exist nothing happens; otherwise the group is removed. This will only work on output cubes, therefore, input cubes will not be updated.

Parameters:
[out] group Name of the group to delete.

References Isis::PvlObject::DeleteGroup(), Isis::PvlObject::FindObject(), getLabel(), and Isis::PvlObject::HasGroup().

Referenced by Isis::SubArea::UpdateLabel().

int Cube::getBandCount (  )  const
double Cube::getBase (  )  const

Returns the base value for converting 8-bit/16-bit pixels to 32-bit.

\[ out = in * multiplier + base \]

Returns:
double The base value for converting 8-bit/16-bit pixels to 32-bit.
ByteOrder Cube::getByteOrder (  )  const

Returns the byte order/endian-ness of the cube file.

Cubes in a native byte order are quicker to read/write than those who must correct their byte order.

Returns:
The byte order/endian-ness of the cube file
Camera * Cube::getCamera (  ) 

Return a camera associated with the cube.

The generation of the camera can throw an exception, so you might want to catch errors if that interests you.

Returns:
A camera based on the open cube

References getLabel(), and isOpen().

Referenced by Isis::ImagePolygon::initCube(), Isis::Chip::Load(), Isis::ControlNetValidMeasure::MetersFromEdge(), Isis::CameraPointInfo::SetCube(), and Isis::ControlNetValidMeasure::ValidStandardOptions().

iString Cube::getFilename (  )  const
Cube::Format Cube::getFormat (  )  const
Returns:
the cube's storage format. If no cube is opened yet, then this is the storage format that will be used if create(...) is called.
PvlGroup & Cube::getGroup ( const iString group  )  const

Read a group from the cube into a Label.

If the group does not exist an exception will be thrown.

Parameters:
[out] group Name of the group to get
Returns:
(PvlGroup) Label which will contain the requested group.

References Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), and getLabel().

Referenced by HiLab::HiLab().

Histogram * Cube::getHistogram ( const int &  band,
const double &  validMin,
const double &  validMax,
iString  msg = "Gathering histogram" 
)

This method returns a pointer to a Histogram object which allows the program to obtain and use various statistics and histogram information from the cube.

Cube does not retain ownership of the returned pointer - please delete it when you are done with it.

Parameters:
[in] band Returns the histogram for the specified band. If the user specifies 0 for this parameter, the method will loop through every band in the cube and accumulate a histogram from all of them
validMin The start of the bin range and valid data range for the histogram
validMax The end of the bin range and valid data range for the histogram
msg The message to display with the percent process while gathering histogram data
Returns:
(Histogram) A pointer to a Histogram object.
Exceptions:
ProgrammerError Band was less than zero or more than the number of bands in the cube.

References _FILEINFO_, Isis::Histogram::AddData(), Isis::Histogram::BinRangeEnd(), Isis::Histogram::BinRangeStart(), Isis::Progress::CheckStatus(), getBandCount(), getLineCount(), line, Isis::iException::Message(), Isis::iException::Programmer, read(), Isis::Histogram::SetBinRange(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Statistics::SetValidRange(), Isis::ValidMaximum, and Isis::ValidMinimum.

Histogram * Cube::getHistogram ( const int &  band = 1,
iString  msg = "Gathering histogram" 
)

This method returns a pointer to a Histogram object which allows the program to obtain and use various statistics and histogram information from the cube.

Cube does not retain ownership of the returned pointer - please delete it when you are done with it.

Parameters:
[in] band (Default value is 1) Returns the histogram for the specified band.If the user specifies 0 for this parameter, the method will loop through every band in the cube and accumulate a histogram from all of them
msg The message to display with the percent process while gathering histogram data
Returns:
(Histogram) A pointer to a Histogram object.
Exceptions:
IsisProgrammerError Band was less than zero or more than the number of bands in the cube.

References Isis::ValidMaximum, and Isis::ValidMinimum.

Pvl * Cube::getLabel (  )  const

Returns a pointer to the IsisLabel object associated with the cube.

Modifications made to the label will be written when the file is closed if it was opened read-write or created. Take care not to mangle the Core Object as this can produce unexpected results when a new attempt is made to open the file. This pointer is invalid as soon as the cube is closed.

Returns:
Pvl Pointer to the Label object associated with the cube.

Referenced by Isis::SerialNumber::Compose(), Isis::ProjectionFactory::CreateFromCube(), deleteGroup(), Isis::CubeViewport::getBandFilterName(), getCamera(), getGroup(), getProjection(), hasGroup(), hasTable(), isProjected(), putGroup(), read(), Isis::SpectralPlotTool::refreshPlot(), Isis::Sensor::Sensor(), Isis::ProcessMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::UniversalGroundMap::UniversalGroundMap(), Isis::SubArea::UpdateLabel(), and Isis::SpectralPlotTool::updateTool().

int Cube::getLabelSize ( bool  actual = false  )  const

Returns the number of bytes used by the label.

Parameters:
actual True for consumed size, false for allocated size (i.e. the number of bytes in the cube set aside for the label).
Returns:
int the number of bytes used by the label.

Referenced by open(), and Isis::Process::SetOutputCube().

int Cube::getLineCount (  )  const
double Cube::getMultiplier (  )  const

Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit.

\[ out = in * multiplier + base \]

Returns:
double The multiplier value for converting 8-bit/16-bit pixels to 32-bit.
int Cube::getPhysicalBand ( const int &  virtualBand  )  const

This method will return the physical band number given a virtual band number.

Physical and virtual bands always match unless the programmer made a call to SetVirtualBand prior to opening the cube.

Parameters:
virtualBand Virtual band to translate to physical band.
Returns:
int The physical band number.

References _FILEINFO_, Isis::iException::Message(), and Isis::iException::Programmer.

Referenced by Isis::CubeViewport::getAllWhatsThisInfo().

PixelType Cube::getPixelType (  )  const
Projection * Cube::getProjection (  ) 
Returns:
a projection associated with the cube. The generation of the projection can throw an exception, so you might want to catch errors if that interests you.

References Isis::ProjectionFactory::CreateFromCube(), getLabel(), and isOpen().

Referenced by Isis::CubeViewport::CubeViewport(), Isis::ImagePolygon::initCube(), Isis::Chip::Load(), Isis::OverlapStatistics::OverlapStatistics(), Isis::Sensor::Sensor(), Isis::ProcessMapMosaic::StartProcess(), and Isis::SubArea::UpdateLabel().

int Cube::getSampleCount (  )  const
Statistics * Cube::getStatistics ( const int &  band,
const double &  validMin,
const double &  validMax,
iString  msg = "Gathering statistics" 
)

This method returns a pointer to a Statistics object which allows the program to obtain and use various statistics from the cube.

Cube does not retain ownership of the returned pointer - please delete it when you are done with it.

Parameters:
band Returns the statistics for the specified band. If the user specifies 0 for this parameter, the method will loop through every band in the cube and accumulate statistics from each band seperately
validMin 
validMax 
msg 
Returns:
Statistics*

References _FILEINFO_, Isis::Statistics::AddData(), Isis::Progress::CheckStatus(), getBandCount(), getLineCount(), line, Isis::iException::Message(), Isis::iException::Programmer, read(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Statistics::SetValidRange(), and stats.

Statistics * Cube::getStatistics ( const int &  band = 1,
iString  msg = "Gathering statistics" 
)

This method returns a pointer to a Statistics object which allows the program to obtain and use various statistics from the cube.

Cube does not retain ownership of the returned pointer - please delete it when you are done with it.

Parameters:
[in] band (Default value is 1) Returns the statistics for the specified band.If the user specifies 0 for this parameter, the method will loop through every band in the cube and accumulate statistics from each band seperately
msg The message to display with the percent process while gathering statistics
Returns:
(Histogram) A pointer to a Statistics object containing details such as the minimum and maximum pixel values for the input cube on the band specified, or all bands as the case may be.

References Isis::ValidMaximum, and Isis::ValidMinimum.

bool Cube::hasGroup ( const iString group  )  const

Return if the cube has a specified group in the labels.

Parameters:
[out] group Name of the group to check.
Returns:
(bool) True if the cube has the specified group, false if not.

References Isis::PvlObject::FindObject(), getLabel(), and Isis::PvlObject::HasGroup().

Referenced by Isis::SubArea::UpdateLabel().

bool Cube::hasTable ( const iString name  ) 

Check to see if the cube contains a pvl table by the provided name.

Parameters:
name The name of the pvl table to search for
Returns:
bool True if the pvl table was found

References getLabel(), Isis::PvlObject::HasKeyword(), Isis::PvlContainer::IsNamed(), Isis::PvlObject::Object(), Isis::PvlObject::Objects(), and Isis::iString::UpCase().

Referenced by Isis::Sensor::Sensor().

bool Cube::isOpen (  )  const

Test if a cube file has been opened/created.

Returns:
True if a cube has been opened and I/O operations are allowed

References ASSERT, and open().

Referenced by addCachingAlgorithm(), close(), create(), Isis::CubeViewport::CubeViewport(), getCamera(), getFilename(), getProjection(), isReadOnly(), open(), read(), Isis::Process::SetInputCube(), and write().

bool Cube::isProjected (  )  const

Returns true if the labels of the cube appear to have a valid mapping group.

This returning true does not guarantee that the cube can project or that the Projection() method will succeed.

Returns:
bool True if the file should have a valid projection

References Isis::PvlObject::FindObject(), and getLabel().

bool Cube::isReadOnly (  )  const

Test if the opened cube is read-only, that is write operations will fail if this is true.

A cube must be opened in order to call this method.

Returns:
True if the cube is opened read-only

References _FILEINFO_, isOpen(), Isis::iException::Message(), Isis::iException::Programmer, and Isis::ReadWrite.

Referenced by isReadWrite(), and write().

bool Cube::isReadWrite (  )  const

Test if the opened cube is read-write, that is read and write operations should succeed if this is true.

A cube must be opened in order to call this method.

Returns:
True if the cube is opened read-write

References isReadOnly().

Referenced by close(), Isis::ProcessByBrick::StartProcess(), and Isis::ProcessByBrick::StartProcessInPlace().

bool Cube::labelsAttached (  )  const

Test if labels are attached.

If a cube is open, then this indicates whether or not the opened cube's labels are attached. If a cube is not open, then this indicates whether or not a cube will be created with attached labels if create(...) is called.

Returns:
True for attached labels, false for detached
void Cube::open ( const iString cubeFilename,
iString  access = "r" 
)
void Cube::putGroup ( PvlGroup group  ) 

Adds a group in a Label to the cube.

If the group already exists in the cube it will be completely overwritten. This will only work on output cubes, therefore, input cubes will not be updated.

Parameters:
[in] group Label containing the group to put.

References Isis::PvlObject::AddGroup(), Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), getLabel(), Isis::PvlObject::HasGroup(), and Isis::PvlContainer::Name().

Referenced by Isis::ProcessMapMosaic::SetOutputCube(), and Isis::SubArea::UpdateLabel().

void Cube::read ( Buffer bufferToFill  ) 

This method will read a buffer of data from the cube as specified by the contents of the Buffer object.

Parameters:
bufferToFill Buffer to be loaded

References _FILEINFO_, isOpen(), Isis::iException::Message(), Isis::iException::Programmer, and Isis::CubeIoHandler::read().

void Cube::read ( Blob blob  )  const
void Cube::reopen ( iString  access = "r"  ) 

This method will reopen an isis sube for reading or reading/writing.

If access requested is read/write and the open fails, open as read only and throw error.

Parameters:
[in] access (std::string) Type of access needed (read or read/write

References _FILEINFO_, close(), Isis::iException::Message(), open(), and Isis::iException::Programmer.

void Cube::setBaseMultiplier ( double  base,
double  mult 
)

Used prior to the Create method, this will specify the base and multiplier for converting 8-bit/16-bit back and forth between 32-bit:

\[ 32-bit pixel = 8-bit/16-bit pixel * multiplier + base \]

.

Parameters:
base Additive constant.
mult Multiplicative constant.

Referenced by Isis::Process::SetOutputCube().

void Cube::setByteOrder ( ByteOrder  byteOrder  ) 

Used prior to the Create method, this will specify the byte order of pixels, either least or most significant byte.

Parameters:
byteOrder An enumeration of either Msb or Lsb.

Referenced by Isis::Process::SetOutputCube().

void Cube::setDimensions ( int  ns,
int  nl,
int  nb 
)

Used prior to the Create method to specify the size of the cube.

If not invoked, a 512 x 512 x 1 cube will be created.

Parameters:
ns Number of samples
nl Number of lines
nb Number of bands

References _FILEINFO_, Isis::iException::Message(), and Isis::iException::Programmer.

Referenced by Isis::Process::SetOutputCube(), and Isis::Chip::Write().

void Cube::setFormat ( Format  format  ) 

Used prior to the Create method, this will specify the format of the cube, either band, sequential or tiled.

If not invoked, a tiled file will be created.

Parameters:
format An enumeration of either Bsq or Tile.

Referenced by Isis::Process::SetOutputCube().

void Cube::setLabelsAttached ( bool  attach  ) 

Use prior to calling create, this sets whether or not to use separate label and data files.

Parameters:
attach If false, the labels and data will be in separate files.

Referenced by Isis::Process::SetOutputCube().

void Cube::setLabelSize ( int  labelBytes  ) 

Used prior to the Create method, this will allocate a specific number of bytes in the label area for attached files.

If not invoked, 65536 bytes will be reserved by default.

Parameters:
[in] labelBytes Number of bytes to reserve for label space.

Referenced by Isis::Process::SetOutputCube().

void Cube::setMinMax ( double  min,
double  max 
)

Used prior to the Create method, this will compute a good base and multiplier value given the minimum/maximum range of the 32bit data.

For example, min=0.0 and max=1.0 of 32-bit pixels will ensure the base and multiplier will cause the data to be spread out fully in the 8=bit or 16-bit range.

Parameters:
min Minimum 32-bit pixel.
max Maximum 32-bit pixel.

References Isis::SignedWord, Isis::UnsignedByte, Isis::VALID_MAX1, Isis::VALID_MAX2, Isis::VALID_MIN1, and Isis::VALID_MIN2.

Referenced by Isis::Process::SetOutputCube().

void Cube::setPixelType ( PixelType  pixelType  ) 

Used prior to the Create method, this will specify the output pixel type.

If not invoked, the pixel type will be Real.

Parameters:
pixelType An enumeration of the pixelType desired in the output cube. See PixelType documentation for more information.

Referenced by Isis::Process::SetOutputCube().

void Cube::setVirtualBands ( const std::vector< std::string > &  vbands  ) 

This is a deprecated version of setVirtualBands(const QList<iString> &).

Parameters:
[in] vbands A vector of strings containing the virtual bands. The vector must contain integers in string form (e.g., "5", "10", "1").

References setVirtualBands().

void Cube::setVirtualBands ( const QList< iString > &  vbands  ) 

This allows the programmer to specify a subset of bands to work with.

This works with both read and write operations, but is typically only used for reading. This is helpful because users can specify which bands from an input cube they want to work with. For example, if the user only wants to work with band 5 out of a 10 band cube, this can be accommodated.

Parameters:
[in] vbands A vector of strings containing the virtual bands. The vector must contain integers in string form (e.g., "5", "10", "1").

References Isis::CubeIoHandler::setVirtualBands().

Referenced by Isis::Workspace::addCubeViewport(), Isis::Process::SetInputCube(), and setVirtualBands().

void Cube::write ( Buffer bufferToWrite  ) 

This method will write a buffer of data from the cube as specified by the contents of the Buffer object.

Parameters:
bufferToWrite Buffer to be written.

References _FILEINFO_, getFilename(), isOpen(), isReadOnly(), Isis::iException::Message(), Isis::iException::Programmer, and Isis::CubeIoHandler::write().

void Cube::write ( Blob blob  ) 

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