|
Isis 3.0 Object Programmers' Reference |
Home |
IO Handler for Isis Cubes. More...
#include <Cube.h>

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. | |
| Cube * | copy (FileName newFile, const CubeAttributeOutput &newFileAttributes) const |
| void | create (const QString &cfile) |
| This method will create an isis cube for writing. | |
| void | create (const QString &cfile, const CubeAttributeOutput &att) |
| void | open (const QString &cfile, QString access="r") |
| This method will open an isis sube for reading or reading/writing. | |
| void | reopen (QString 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) const |
| 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:
| |
| 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 | setExternalDnData (FileName cubeFileWithDnData) |
| 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< QString > &vbands) |
| This allows the programmer to specify a subset of bands to work with. | |
| void | setVirtualBands (const std::vector< QString > &vbands) |
| This is a deprecated version of setVirtualBands(const QList<QString> &). | |
| int | bandCount () const |
| Returns the number of virtual bands for the cube. | |
| double | base () const |
| Returns the base value for converting 8-bit/16-bit pixels to 32-bit. | |
| ByteOrder | byteOrder () const |
| Returns the byte order/endian-ness of the cube file. | |
| Camera * | camera () |
| Return a camera associated with the cube. | |
| QString | fileName () const |
| Returns the opened cube's filename. | |
| Format | format () const |
| Histogram * | histogram (const int &band=1, QString 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. | |
| Histogram * | histogram (const int &band, const double &validMin, const double &validMax, QString 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. | |
| Pvl * | label () const |
| Returns a pointer to the IsisLabel object associated with the cube. | |
| int | labelSize (bool actual=false) const |
| Returns the number of bytes used by the label. | |
| int | lineCount () const |
| double | multiplier () const |
| Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit. | |
| PixelType | pixelType () const |
| int | physicalBand (const int &virtualBand) const |
| This method will return the physical band number given a virtual band number. | |
| Projection * | projection () |
| int | sampleCount () const |
| Statistics * | statistics (const int &band=1, QString 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. | |
| Statistics * | statistics (const int &band, const double &validMin, const double &validMax, QString 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. | |
| bool | storesDnData () const |
| 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 (QString BlobType, QString BlobName) |
| This method will delete a blob label object from the cube as specified by the Blob type and name. | |
| void | deleteGroup (const QString &group) |
| Deletes a group from the cube labels. | |
| PvlGroup & | group (const QString &group) const |
| Read a group from the cube into a Label. | |
| bool | hasGroup (const QString &group) const |
| Return if the cube has a specified group in the labels. | |
| bool | hasTable (const QString &name) |
| Check to see if the cube contains a pvl table by the provided name. | |
| void | putGroup (const PvlGroup &group) |
| Adds a group in a Label to the cube. | |
Private Member Functions | |
| void | applyVirtualBandsToLabel () |
| void | cleanUp (bool remove) |
| This clears all of the allocated memory associated with an open cube. | |
| QFile * | dataFile () const |
| This returns the QFile with cube DN data in it. | |
| FileName | realDataFileName () const |
| This gets the file name of the file which actually contains the DN data. | |
| void | initialize () |
| This sets Cube to its default state: Native byte order Format = Tile PixelType = Real (4 bytes per pixel) Attached labels Label size = 65536 bytes # samples, lines, bands unset Base = 0 Multiplier = 1.0. | |
| void | initCoreFromLabel (const Pvl &label) |
| void | initLabelFromFile (FileName labelFileName, bool readWrite) |
| void | openCheck () |
| Throw an exception if the cube is not open. | |
| Pvl | realDataFileLabel () const |
| void | reformatOldIsisLabel (const QString &oldCube) |
| This is a helper, used by open(. | |
| void | writeLabels () |
| Write the Pvl labels to the cube's label file. | |
Private Attributes | |
| QFile * | m_labelFile |
| This is the file that contains the labels always; if labels are attached then this contains the file data also. | |
| QFile * | m_dataFile |
| This is only sometimes allocated. | |
| CubeIoHandler * | m_ioHandler |
| This does the heavy lifting for cube DN IO and is always allocated when isOpen() is true. | |
| ByteOrder | m_byteOrder |
| The byte order of the opened cube; if there is no open cube then this is the byte order that will be used when a new cube is created. | |
| Format | m_format |
| If isOpen() then this is the IO format that the cube uses. | |
| PixelType | m_pixelType |
| This is the pixel type on disk. | |
| QMutex * | m_mutex |
| Basic thread-safety mutex; this class is not optimized for threads. | |
| Camera * | m_camera |
| Camera allocated from the camera() method. | |
| Projection * | m_projection |
| Projection allocated from the projection() method. | |
| FileName * | m_labelFileName |
| The full filename of the label file (.lbl or .cub). | |
| FileName * | m_dataFileName |
| The full filename of the data file (.cub). | |
| FileName * | m_tempCube |
| If open was called with an Isis 2 cube, then this will be the name of the imported Isis3 cube. | |
| FileName * | m_formatTemplateFile |
| Label pvl format template file (describes how to format labels). | |
| bool | m_attached |
| True if labels are attached. | |
| bool | m_storesDnData |
| True (most common case) when the cube DN data is inside the file we're writing to. | |
| Pvl * | m_label |
| The label if IsOpen(), otherwise NULL. | |
| int | m_labelBytes |
| The maximum allowed size of the label; the allocated space. | |
| int | m_samples |
| The sample count of the open cube or the cube that will be created. | |
| int | m_lines |
| The line count of the open cube or the cube that will be created. | |
| int | m_bands |
| The band count of the open cube or the cube that will be created. | |
| double | m_base |
| The base of the open cube or the cube that will be created; does not apply if m_pixelType is Real. | |
| double | m_multiplier |
| The multiplier of the open cube or the cube that will be created; does not apply if m_pixelType is Real. | |
| QList< int > * | m_virtualBandList |
| If allocated, converts from physical on-disk band # to virtual band #. | |
IO Handler for Isis Cubes.
This class is used to open, create, read, and write data from Isis cube files.
For internal use only.
Definition at line 137 of file Cube.h.
| enum Isis::Cube::Format |
These are the possible storage formats of Isis3 cubes.
There is an internal IO handler for each one of these.
| 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. |
| Cube::Cube | ( | ) |
Constructs a Cube object.
Definition at line 56 of file Cube.cpp.
References initialize(), m_camera, m_dataFile, m_dataFileName, m_formatTemplateFile, m_ioHandler, m_label, m_labelFile, m_labelFileName, m_mutex, m_projection, m_tempCube, and m_virtualBandList.
| Cube::~Cube | ( | ) | [virtual] |
Destroys the Cube object.
Definition at line 82 of file Cube.cpp.
References close(), m_camera, m_formatTemplateFile, m_mutex, and m_projection.
| 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.
| algorithm | The caching algorithm to add to the Cube for I/O |
Definition at line 1405 of file Cube.cpp.
References _FILEINFO_, Isis::CubeIoHandler::addCachingAlgorithm(), isOpen(), m_ioHandler, and Isis::IException::Programmer.
Referenced by Isis::DemShape::DemShape(), and Isis::ProcessMapMosaic::SetOutputCube().
| int Cube::bandCount | ( | ) | const |
Returns the number of virtual bands for the cube.
Definition at line 1014 of file Cube.cpp.
References m_bands, m_virtualBandList, and numBands.
Referenced by Isis::Process::CalculateStatistics(), Isis::CubeViewport::cubeBands(), Isis::CubeViewport::CubeViewport(), Isis::CubeViewport::getAllWhatsThisInfo(), Isis::SpectralPlotTool::getSpectralStatistics(), Isis::Histogram::Histogram(), histogram(), Isis::OverlapStatistics::OverlapStatistics(), Isis::Reduce::Reduce(), Isis::FileTool::saveAs_FullResolution(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsEnlargedCube(), Isis::FileTool::saveAsReducedCube(), Isis::Process::SetInputCube(), Isis::ProcessMapMosaic::SetOutputCube(), statistics(), and Isis::SpectralPlotTool::updateTool().
| double Cube::base | ( | ) | const |
Returns the base value for converting 8-bit/16-bit pixels to 32-bit.
Definition at line 1031 of file Cube.cpp.
References m_base.
Referenced by Isis::FileTool::copyCubeDetails().
| ByteOrder Cube::byteOrder | ( | ) | 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.
Definition at line 1043 of file Cube.cpp.
References m_byteOrder.
| Camera * Cube::camera | ( | ) |
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.
Definition at line 1055 of file Cube.cpp.
References Isis::CameraFactory::Create(), isOpen(), label(), and m_camera.
Referenced by Isis::StereoTool::calculateElevation(), Isis::CameraStatistics::CameraStatistics(), Isis::InterestOperator::FindCnetRef(), Isis::ImagePolygon::initCube(), Isis::InterestOperator::InterestByMeasure(), Isis::Chip::Load(), Isis::ControlNetValidMeasure::MetersFromEdge(), Isis::SunShadowTool::mouseButtonPress(), Isis::SunShadowTool::recalculateShadowHeight(), Isis::CameraPointInfo::SetCube(), Isis::SunShadowTool::updateTool(), and Isis::ControlNetValidMeasure::ValidStandardOptions().
| void Cube::cleanUp | ( | bool | removeIt | ) | [private] |
This clears all of the allocated memory associated with an open cube.
| removeIt | If true, the input cube will be removed from disk |
Definition at line 1566 of file Cube.cpp.
References initialize(), m_dataFile, m_dataFileName, m_ioHandler, m_label, m_labelFile, m_labelFileName, m_tempCube, and m_virtualBandList.
Referenced by close(), create(), open(), and writeLabels().
| 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.
Definition at line 1421 of file Cube.cpp.
References Isis::CubeIoHandler::clearCache(), m_ioHandler, and m_mutex.
| void Cube::close | ( | bool | removeIt = false |
) |
Closes the cube and updates the labels.
Optionally, it deletes the cube if requested.
| removeIt | (Default value = false) Indicates if the file should be removed/deleted. |
Definition at line 181 of file Cube.cpp.
References cleanUp(), isOpen(), isReadWrite(), and writeLabels().
Referenced by Isis::ImageOverlapSet::FindImageOverlaps(), reopen(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::GuiCubeParameter::ViewCube(), Isis::GuiCubeParameter::ViewLabel(), Isis::Chip::Write(), and ~Cube().
| void Cube::create | ( | const QString & | 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
| 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. |
Definition at line 322 of file Cube.cpp.
References _FILEINFO_, Isis::PvlObject::AddGroup(), Isis::PvlObject::AddObject(), Bsq, cleanUp(), core(), dataFile(), Isis::IException::Io, isOpen(), m_attached, m_bands, m_base, m_byteOrder, m_dataFile, m_dataFileName, m_format, m_ioHandler, m_label, m_labelBytes, m_labelFile, m_labelFileName, m_lines, m_multiplier, m_pixelType, m_samples, m_storesDnData, m_virtualBandList, Isis::PixelTypeName(), Isis::IException::Programmer, realDataFileName(), size, Isis::SizeOf(), Isis::toString(), Isis::IException::Unknown, Isis::CubeIoHandler::updateLabels(), Isis::IException::User, and writeLabels().
Referenced by Isis::FileTool::copyCubeDetails(), Isis::ImageImporter::createOutput(), Isis::Process::SetOutputCube(), and Isis::Chip::Write().
| QFile * Cube::dataFile | ( | ) | const [private] |
This returns the QFile with cube DN data in it.
NULL will be returned if no files are opened.
Definition at line 1616 of file Cube.cpp.
References m_dataFile, and m_labelFile.
| bool Cube::deleteBlob | ( | QString | BlobType, | |
| QString | 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.
| BlobType | type of blob to search for (Polygon, Table, etc) | |
| BlobName | blob to be deleted |
Definition at line 1438 of file Cube.cpp.
References Isis::PvlObject::DeleteObject(), Isis::PvlObject::FindKeyword(), m_label, Isis::PvlContainer::Name(), Isis::PvlObject::Object(), and Isis::PvlObject::Objects().
| void Cube::deleteGroup | ( | const QString & | 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.
| [out] | group | Name of the group to delete. |
Definition at line 1460 of file Cube.cpp.
References Isis::PvlObject::DeleteGroup(), Isis::PvlObject::FindObject(), Isis::PvlObject::HasGroup(), and label().
Referenced by Isis::SubArea::UpdateLabel().
| QString Cube::fileName | ( | ) | const |
Returns the opened cube's filename.
This is the name of the file which contains the labels of the cube and not necessarily the cube data.
Definition at line 1069 of file Cube.cpp.
References isOpen(), and m_labelFileName.
Referenced by Isis::Workspace::addCubeViewport(), Isis::ImagePolygon::Create(), Isis::StereoTool::createPoint(), Isis::MatchTool::createPoint(), Isis::CubeViewport::CubeViewport(), Isis::FeatureNomenclatureTool::featuresForViewportFound(), Isis::CubeViewport::getAllWhatsThisInfo(), Isis::CameraPointInfo::GetPointInfo(), Isis::ImagePolygon::initCube(), Isis::Chip::Load(), Isis::ControlNetValidMeasure::MetersFromEdge(), Isis::MatchTool::mouseButtonRelease(), Isis::InterestOperator::Operate(), Isis::OverlapStatistics::OverlapStatistics(), Isis::CubePlotCurve::paint(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::AbstractPlotTool::repaintViewports(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::ScatterPlotWindow::ScatterPlotWindow(), Isis::MatchTool::serialNumberList(), Isis::CubeViewport::setCaption(), Isis::StereoTool::setFiles(), Isis::MeasureTool::updateDist(), Isis::AdvancedTrackTool::updateRow(), Isis::ControlNetValidMeasure::ValidStandardOptions(), and write().
| Cube::Format Cube::format | ( | ) | const |
| PvlGroup & Cube::group | ( | const QString & | group | ) | const |
Read a group from the cube into a Label.
If the group does not exist an exception will be thrown.
| [out] | group | Name of the group to get |
Definition at line 1474 of file Cube.cpp.
References Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), and label().
Referenced by Isis::HiLab::HiLab().
| bool Cube::hasGroup | ( | const QString & | group | ) | const |
Return if the cube has a specified group in the labels.
| [out] | group | Name of the group to check. |
Definition at line 1487 of file Cube.cpp.
References Isis::PvlObject::FindObject(), Isis::PvlObject::HasGroup(), and label().
Referenced by Isis::SubArea::UpdateLabel().
| bool Cube::hasTable | ( | const QString & | name | ) |
Check to see if the cube contains a pvl table by the provided name.
| name | The name of the pvl table to search for |
Definition at line 1501 of file Cube.cpp.
References Isis::PvlObject::HasKeyword(), Isis::PvlContainer::IsNamed(), label(), Isis::PvlObject::Object(), and Isis::PvlObject::Objects().
Referenced by Isis::AdvancedTrackTool::TrackMosaicOrigin().
| Histogram * Cube::histogram | ( | const int & | band, | |
| const double & | validMin, | |||
| const double & | validMax, | |||
| QString | 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.
| [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 |
| ProgrammerError | Band was less than zero or more than the number of bands in the cube. |
Definition at line 1135 of file Cube.cpp.
References _FILEINFO_, Isis::Histogram::AddData(), bandCount(), Isis::Progress::CheckStatus(), Isis::Buffer::DoubleBuffer(), line, lineCount(), Isis::IException::Programmer, read(), Isis::LineManager::SetLine(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Buffer::size(), Isis::ValidMaximum, and Isis::ValidMinimum.
| Histogram * Cube::histogram | ( | const int & | band = 1, |
|
| QString | 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.
| [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 |
| IsisProgrammerError | Band was less than zero or more than the number of bands in the cube. |
Definition at line 1105 of file Cube.cpp.
References Isis::ValidMaximum, and Isis::ValidMinimum.
| void Cube::initialize | ( | ) | [private] |
This sets Cube to its default state: Native byte order Format = Tile PixelType = Real (4 bytes per pixel) Attached labels Label size = 65536 bytes # samples, lines, bands unset Base = 0 Multiplier = 1.0.
Definition at line 1681 of file Cube.cpp.
References Isis::IsBigEndian(), m_attached, m_bands, m_base, m_byteOrder, m_format, m_labelBytes, m_lines, m_multiplier, m_pixelType, m_samples, m_storesDnData, and Tile.
| bool Cube::isOpen | ( | ) | const |
Test if a cube file has been opened/created.
Definition at line 104 of file Cube.cpp.
References m_ioHandler, m_label, m_labelFile, m_labelFileName, and open().
Referenced by addCachingAlgorithm(), camera(), close(), create(), Isis::CubeViewport::CubeViewport(), fileName(), isReadOnly(), open(), openCheck(), projection(), read(), Isis::Process::SetInputCube(), write(), and writeLabels().
| 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.
Definition at line 123 of file Cube.cpp.
References Isis::PvlObject::FindObject(), and label().
| 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.
Definition at line 134 of file Cube.cpp.
References _FILEINFO_, isOpen(), m_labelFile, and Isis::IException::Programmer.
Referenced by isReadWrite(), Isis::EditTool::mouseButtonRelease(), Isis::EditTool::redoEdit(), Isis::EditTool::rubberBandComplete(), Isis::EditTool::undoAll(), Isis::EditTool::undoEdit(), 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.
Definition at line 156 of file Cube.cpp.
References isReadOnly().
Referenced by close(), Isis::ProcessByBrick::ProcessCubeInPlace(), and Isis::ProcessByBrick::StartProcess().
| Pvl * Cube::label | ( | ) | 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.
Definition at line 1200 of file Cube.cpp.
References m_label.
Referenced by camera(), Isis::SerialNumber::Compose(), Isis::ObservationNumber::Compose(), Isis::FileTool::copyCubeDetails(), Isis::ProjectionFactory::CreateFromCube(), deleteGroup(), Isis::DemShape::DemShape(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::CubeViewport::getBandFilterName(), Isis::SpectralPlotTool::getSpectralStatistics(), group(), hasGroup(), hasTable(), Isis::ImageImporter::import(), isProjected(), Isis::Kernels::Kernels(), projection(), Isis::Process::PropagateTables(), putGroup(), read(), Isis::ProcessMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::UniversalGroundMap::UniversalGroundMap(), Isis::SubArea::UpdateLabel(), Isis::SpectralPlotTool::updateTool(), Isis::BandTool::updateTool(), and Isis::GuiCubeParameter::ViewLabel().
| 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.
Definition at line 169 of file Cube.cpp.
References m_attached.
| int Cube::labelSize | ( | bool | actual = false |
) | const |
Returns the number of bytes used by the label.
| actual | True for consumed size, false for allocated size (i.e. the number of bytes in the cube set aside for the label). |
Definition at line 1212 of file Cube.cpp.
References m_label, and m_labelBytes.
Referenced by Isis::FileTool::copyCubeDetails(), open(), and Isis::Process::SetOutputCube().
| int Cube::lineCount | ( | ) | const |
Definition at line 1233 of file Cube.cpp.
References m_lines.
Referenced by Isis::ImagePolygon::calcImageBorderCoordinates(), Isis::Process::CalculateStatistics(), Isis::StereoTool::createPoint(), Isis::CubeViewport::cubeContentsChanged(), Isis::CubeViewport::cubeDataChanged(), Isis::CubeViewport::cubeLines(), Isis::CubeViewport::CubeViewport(), Isis::Enlarge::Enlarge(), Isis::ControlNetStatistics::GenerateImageStats(), Isis::CubeViewport::getAllWhatsThisInfo(), Isis::UniversalGroundMap::GroundRange(), Isis::StretchTool::histFromCube(), histogram(), Isis::ImagePolygon::initCube(), Isis::ControlNetValidMeasure::MetersFromEdge(), Isis::EditTool::mouseButtonRelease(), Isis::OverlapStatistics::OverlapStatistics(), Isis::ControlNetValidMeasure::PixelsFromEdge(), Isis::Chip::Read(), Isis::Reduce::Reduce(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::FileTool::saveAs_FullResolution(), Isis::FileTool::saveAsCubeByOption(), Isis::ScatterPlotData::ScatterPlotData(), Isis::CameraPointInfo::SetCenter(), Isis::QtExporter::setGrayscale(), Isis::ImageExporter::setInput(), Isis::Process::SetInputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::QtExporter::setRgb(), Isis::QtExporter::setRgba(), Isis::CameraPointInfo::SetSample(), Isis::ProcessMapMosaic::StartProcess(), statistics(), Isis::StretchTool::statsFromCube(), Isis::TileManager::TileManager(), Isis::SubArea::UpdateLabel(), Isis::Reduce::UpdateOutputLabel(), and Isis::Enlarge::UpdateOutputLabel().
| double Cube::multiplier | ( | ) | const |
Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit.
Definition at line 1247 of file Cube.cpp.
References m_multiplier.
Referenced by Isis::FileTool::copyCubeDetails().
| void Cube::open | ( | const QString & | cubeFileName, | |
| QString | access = "r" | |||
| ) |
This method will open an isis sube for reading or reading/writing.
| [in] | cubeFileName | Name of the cube file to open. Environment variables in the filename will be automatically expanded. |
| [in] | access | (Default value of "r") Defines how the cube will be accessed. Either read-only "r" or read-write "rw". |
Definition at line 510 of file Cube.cpp.
References _FILEINFO_, Bsq, cleanUp(), core(), dataFile(), Isis::PvlObject::FindObject(), Isis::PvlObject::HasKeyword(), Isis::IException::Io, isOpen(), labelSize(), m_attached, m_dataFile, m_dataFileName, m_format, m_ioHandler, m_label, m_labelBytes, m_labelFile, m_labelFileName, m_storesDnData, m_virtualBandList, Isis::FileName::path(), Isis::IException::Programmer, and realDataFileName().
Referenced by Isis::CubeDataThread::AddCube(), Isis::Workspace::addCubeViewport(), Isis::ProcessPolygons::AppendOutputCube(), Isis::Equalization::calculateStatistics(), Isis::CameraStatistics::CameraStatistics(), Isis::CubeDisplayProperties::cube(), Isis::ImageOverlapSet::FindImageOverlaps(), isOpen(), Isis::Blobber::load(), Isis::Process::PropagateTables(), reopen(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::MatchTool::selectLeftMeasure(), Isis::MatchTool::selectRightMeasure(), Isis::Process::SetInputCube(), Isis::ProcessMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::GuiCubeParameter::ViewCube(), and Isis::GuiCubeParameter::ViewLabel().
| void Cube::openCheck | ( | ) | [private] |
Throw an exception if the cube is not open.
Definition at line 1839 of file Cube.cpp.
References _FILEINFO_, isOpen(), and Isis::IException::Programmer.
Referenced by setBaseMultiplier(), setByteOrder(), setDimensions(), setFormat(), setLabelsAttached(), setLabelSize(), setMinMax(), setPixelType(), and setVirtualBands().
| int Cube::physicalBand | ( | 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.
| virtualBand | Virtual band to translate to physical band. |
Definition at line 1272 of file Cube.cpp.
References _FILEINFO_, m_virtualBandList, Isis::IException::Programmer, and Isis::toString().
Referenced by Isis::CubeViewport::getAllWhatsThisInfo(), and Isis::CubeViewport::updateWhatsThis().
| PixelType Cube::pixelType | ( | ) | const |
Definition at line 1257 of file Cube.cpp.
References m_pixelType.
Referenced by Isis::FileTool::copyCubeDetails(), Isis::CubeViewport::CubeViewport(), Isis::DemShape::DemShape(), Isis::MosaicSceneItem::getPixelValue(), Isis::CameraPointInfo::GetPointInfo(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::StatisticsTool::getStatistics(), Isis::StretchTool::histFromCube(), Isis::Histogram::Histogram(), Isis::ImagePolygon::initCube(), Isis::InterestOperator::InterestByMeasure(), Isis::EditTool::mouseButtonRelease(), Isis::OverlapStatistics::OverlapStatistics(), Isis::ScatterPlotWindow::paint(), Isis::Chip::Read(), Isis::EditTool::redoEdit(), Isis::Reduce::Reduce(), Isis::FileTool::saveAs_FullResolution(), Isis::ScatterPlotData::ScatterPlotData(), Isis::ScatterPlotWindow::setMousePosition(), Isis::Process::SetOutputCube(), Isis::StretchTool::statsFromCube(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().
| Projection * Cube::projection | ( | ) |
Definition at line 1293 of file Cube.cpp.
References Isis::ProjectionFactory::CreateFromCube(), isOpen(), label(), and m_projection.
Referenced by Isis::CubeViewport::CubeViewport(), Isis::DemShape::DemShape(), Isis::ImagePolygon::initCube(), Isis::Chip::Load(), Isis::OverlapStatistics::OverlapStatistics(), Isis::ProcessMapMosaic::StartProcess(), and Isis::SubArea::UpdateLabel().
| void Cube::putGroup | ( | const 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.
| [in] | group | Label containing the group to put. |
Definition at line 1526 of file Cube.cpp.
References Isis::PvlObject::AddGroup(), Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), Isis::PvlObject::HasGroup(), label(), and Isis::PvlContainer::Name().
Referenced by Isis::ProcessMapMosaic::SetOutputCube(), and Isis::SubArea::UpdateLabel().
| void Cube::read | ( | Buffer & | bufferToFill | ) | const |
This method will read a buffer of data from the cube as specified by the contents of the Buffer object.
| bufferToFill | Buffer to be loaded |
Definition at line 707 of file Cube.cpp.
References _FILEINFO_, isOpen(), m_ioHandler, m_mutex, Isis::IException::Programmer, and Isis::CubeIoHandler::read().
| void Cube::read | ( | Blob & | blob | ) | const |
This method will read data from the specified Blob object.
| [in] | blob | The Blob data to be loaded |
Definition at line 685 of file Cube.cpp.
References _FILEINFO_, Isis::CubeIoHandler::dataFileMutex(), isOpen(), label(), m_ioHandler, m_labelFileName, m_mutex, m_tempCube, Isis::IException::Programmer, and Isis::Blob::Read().
Referenced by Isis::CubeViewport::bluePixel(), Isis::Process::CalculateStatistics(), Isis::FileTool::copyCubeDetails(), Isis::ImageOverlapSet::FindImageOverlaps(), Isis::InterestOperator::FindOverlapByImageFootPrint(), Isis::CubeDisplayProperties::footprint(), Isis::MosaicSceneItem::getPixelValue(), Isis::CameraPointInfo::GetPointInfo(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::SpectralPlotTool::getSpectralStatistics(), Isis::StatisticsTool::getStatistics(), Isis::MosaicSceneItem::getStretch(), Isis::CubeViewport::grayPixel(), Isis::CubeViewport::greenPixel(), Isis::UniversalGroundMap::GroundRange(), Isis::StretchTool::histFromCube(), Isis::Histogram::Histogram(), histogram(), Isis::InterestOperator::InterestByMeasure(), Isis::Blobber::load(), Isis::DemShape::localRadius(), Isis::EditTool::mouseButtonRelease(), Isis::Average::operator()(), Isis::Nearest::operator()(), Isis::ProcessByBrick::ProcessCubeFunctor< T >::operator()(), Isis::ProcessByBrick::ProcessCubeInPlaceFunctor< T >::operator()(), Isis::OverlapStatistics::OverlapStatistics(), Isis::ScatterPlotWindow::paint(), Isis::Process::PropagateTables(), Isis::Chip::Read(), Isis::EditTool::redoEdit(), Isis::CubeViewport::redPixel(), Isis::HistogramTool::refreshPlot(), Isis::FileTool::saveAs_FullResolution(), Isis::FileTool::saveAsFullImage(), Isis::ScatterPlotData::ScatterPlotData(), Isis::ImagePolygon::SetImage(), Isis::ScatterPlotWindow::setMousePosition(), Isis::ProcessByBrick::StartProcess(), statistics(), Isis::StretchTool::statsFromCube(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().
| FileName Cube::realDataFileName | ( | ) | const [private] |
This gets the file name of the file which actually contains the DN data.
With ecub's, our data file name could be another ecub or a detached label, so using m_dataFileName is unreasonable.
Definition at line 1629 of file Cube.cpp.
References Isis::PvlObject::FindObject(), m_attached, m_dataFileName, m_labelFileName, and m_storesDnData.
| void Cube::reformatOldIsisLabel | ( | const QString & | oldCube | ) | [private] |
This is a helper, used by open(.
..), that handles opening Isis 2 cubes as if they were Isis 3 cubes.
| oldCube | The filename of the Isis 2 cube |
Definition at line 1870 of file Cube.cpp.
References m_label, m_labelFile, m_tempCube, Isis::ProgramLauncher::RunIsisProgram(), and Isis::ProgramLauncher::RunSystemCommand().
| void Cube::reopen | ( | QString | 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.
| [in] | access | (QString) Type of access needed (read or read/write |
Definition at line 652 of file Cube.cpp.
References _FILEINFO_, close(), m_labelFile, m_labelFileName, m_virtualBandList, open(), and Isis::IException::Programmer.
Referenced by Isis::EditTool::mouseButtonRelease(), Isis::EditTool::rubberBandComplete(), and Isis::FileTool::save().
| int Cube::sampleCount | ( | ) | const |
Definition at line 1306 of file Cube.cpp.
References m_samples.
Referenced by Isis::StereoTool::createPoint(), Isis::CubeViewport::cubeContentsChanged(), Isis::CubeViewport::cubeDataChanged(), Isis::CubeViewport::cubeSamples(), Isis::CubeViewport::CubeViewport(), Isis::Enlarge::Enlarge(), Isis::ControlNetStatistics::GenerateImageStats(), Isis::CubeViewport::getAllWhatsThisInfo(), Isis::UniversalGroundMap::GroundRange(), Isis::StretchTool::histFromCube(), Isis::ImagePolygon::initCube(), Isis::ControlNetValidMeasure::MetersFromEdge(), Isis::EditTool::mouseButtonRelease(), Isis::OverlapStatistics::OverlapStatistics(), Isis::ControlNetValidMeasure::PixelsFromEdge(), Isis::CubeCalculator::prepareCalculations(), Isis::Chip::Read(), Isis::Reduce::Reduce(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::FileTool::saveAs_FullResolution(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsFullImage(), Isis::ScatterPlotData::ScatterPlotData(), Isis::CameraPointInfo::SetCenter(), Isis::QtExporter::setGrayscale(), Isis::ImageExporter::setInput(), Isis::Process::SetInputCube(), Isis::CameraPointInfo::SetLine(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::QtExporter::setRgb(), Isis::QtExporter::setRgba(), Isis::ProcessMapMosaic::StartProcess(), Isis::StretchTool::statsFromCube(), Isis::TileManager::TileManager(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::SubArea::UpdateLabel(), Isis::Reduce::UpdateOutputLabel(), and Isis::Enlarge::UpdateOutputLabel().
| 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:
.
| base | Additive constant. | |
| mult | Multiplicative constant. |
Definition at line 816 of file Cube.cpp.
References m_base, m_multiplier, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| byteOrder | An enumeration of either Msb or Lsb. |
Definition at line 861 of file Cube.cpp.
References m_byteOrder, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| ns | Number of samples | |
| nl | Number of lines | |
| nb | Number of bands |
Definition at line 876 of file Cube.cpp.
References _FILEINFO_, m_bands, m_lines, m_samples, openCheck(), and Isis::IException::Programmer.
Referenced by Isis::FileTool::copyCubeDetails(), Isis::ImageImporter::createOutput(), 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.
| format | An enumeration of either Bsq or Tile. |
Definition at line 914 of file Cube.cpp.
References m_format, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| attach | If false, the labels and data will be in separate files. |
Definition at line 926 of file Cube.cpp.
References m_attached, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| [in] | labelBytes | Number of bytes to reserve for label space. |
Definition at line 939 of file Cube.cpp.
References m_labelBytes, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| min | Minimum 32-bit pixel. | |
| max | Maximum 32-bit pixel. |
Definition at line 833 of file Cube.cpp.
References m_base, m_multiplier, m_pixelType, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and 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.
| pixelType | An enumeration of the pixelType desired in the output cube. See PixelType documentation for more information. |
Definition at line 952 of file Cube.cpp.
References m_pixelType, and openCheck().
Referenced by Isis::FileTool::copyCubeDetails(), and Isis::Process::SetOutputCube().
| void Cube::setVirtualBands | ( | const std::vector< QString > & | vbands | ) |
This is a deprecated version of setVirtualBands(const QList<QString> &).
| [in] | vbands | A vector of strings containing the virtual bands. The vector must contain integers in string form (e.g., "5", "10", "1"). |
Definition at line 999 of file Cube.cpp.
References setVirtualBands().
| void Cube::setVirtualBands | ( | const QList< QString > & | 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.
| [in] | vbands | A vector of strings containing the virtual bands. The vector must contain integers in string form (e.g., "5", "10", "1"). |
Definition at line 969 of file Cube.cpp.
References m_ioHandler, m_virtualBandList, openCheck(), Isis::CubeIoHandler::setVirtualBands(), and Isis::toInt().
Referenced by Isis::Workspace::addCubeViewport(), Isis::Process::SetInputCube(), and setVirtualBands().
| Statistics * Cube::statistics | ( | const int & | band, | |
| const double & | validMin, | |||
| const double & | validMax, | |||
| QString | 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.
| 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 |
Definition at line 1350 of file Cube.cpp.
References _FILEINFO_, Isis::Statistics::AddData(), bandCount(), Isis::Progress::CheckStatus(), Isis::Buffer::DoubleBuffer(), line, lineCount(), Isis::IException::Programmer, read(), Isis::LineManager::SetLine(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Buffer::size(), and stats.
| Statistics * Cube::statistics | ( | const int & | band = 1, |
|
| QString | 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.
| [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 |
Definition at line 1329 of file Cube.cpp.
References Isis::ValidMaximum, and Isis::ValidMinimum.
| 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.
| bufferToWrite | Buffer to be written. |
Definition at line 783 of file Cube.cpp.
References _FILEINFO_, fileName(), isOpen(), isReadOnly(), m_ioHandler, m_mutex, m_storesDnData, Isis::IException::Programmer, Isis::IException::Unknown, and Isis::CubeIoHandler::write().
| void Cube::write | ( | Blob & | blob | ) |
This method will write a blob of data (e.g.
History, Table, etc) to the cube as specified by the contents of the Blob object.
| blob | data to be written |
Definition at line 724 of file Cube.cpp.
References _FILEINFO_, Isis::CubeIoHandler::dataFileMutex(), fileName(), Isis::CubeIoHandler::getDataSize(), Isis::IException::Io, isOpen(), m_attached, m_ioHandler, m_label, m_labelBytes, m_labelFile, m_labelFileName, m_mutex, Isis::Blob::Name(), Isis::IException::Programmer, Isis::Blob::Type(), and Isis::Blob::Write().
Referenced by Isis::FileTool::copyCubeDetails(), Isis::ProcessByBrick::ProcessCubeFunctor< T >::operator()(), Isis::ProcessByBrick::ProcessCubeInPlaceFunctor< T >::operator()(), Isis::EditTool::redoEdit(), Isis::FileTool::saveAs_FullResolution(), Isis::FileTool::saveAsFullImage(), Isis::Process::SetOutputCube(), Isis::ProcessByBrick::StartProcess(), Isis::EditTool::undoAll(), Isis::EditTool::undoEdit(), Isis::Chip::Write(), Isis::Process::WriteHistory(), and Isis::EditTool::writeToCube().
| void Cube::writeLabels | ( | ) | [private] |
Write the Pvl labels to the cube's label file.
Excess data in the attached labels is set to 0.
Definition at line 1895 of file Cube.cpp.
References _FILEINFO_, cleanUp(), Isis::CubeIoHandler::dataFileMutex(), Isis::IException::Io, isOpen(), m_attached, m_formatTemplateFile, m_ioHandler, m_label, m_labelBytes, m_labelFile, m_labelFileName, m_mutex, Isis::IException::Programmer, and Isis::Pvl::Write().
bool Isis::Cube::m_attached [private] |
True if labels are attached.
Definition at line 351 of file Cube.h.
Referenced by create(), initialize(), labelsAttached(), open(), realDataFileName(), setLabelsAttached(), write(), and writeLabels().
int Isis::Cube::m_bands [private] |
The band count of the open cube or the cube that will be created.
Definition at line 373 of file Cube.h.
Referenced by bandCount(), create(), initialize(), and setDimensions().
double Isis::Cube::m_base [private] |
The base of the open cube or the cube that will be created; does not apply if m_pixelType is Real.
Definition at line 379 of file Cube.h.
Referenced by base(), create(), initialize(), setBaseMultiplier(), and setMinMax().
ByteOrder Isis::Cube::m_byteOrder [private] |
The byte order of the opened cube; if there is no open cube then this is the byte order that will be used when a new cube is created.
Defaults to the OS's byte order.
Definition at line 309 of file Cube.h.
Referenced by byteOrder(), create(), initialize(), and setByteOrder().
Camera* Isis::Cube::m_camera [private] |
QFile* Isis::Cube::m_dataFile [private] |
FileName* Isis::Cube::m_dataFileName [private] |
Format Isis::Cube::m_format [private] |
If isOpen() then this is the IO format that the cube uses.
If there is no file opened then this is the IO format that will be used if a cube is created (using create(...)). This defaults to Tile.
Definition at line 316 of file Cube.h.
Referenced by create(), format(), initialize(), open(), and setFormat().
FileName* Isis::Cube::m_formatTemplateFile [private] |
Label pvl format template file (describes how to format labels).
Definition at line 348 of file Cube.h.
Referenced by Cube(), writeLabels(), and ~Cube().
CubeIoHandler* Isis::Cube::m_ioHandler [private] |
This does the heavy lifting for cube DN IO and is always allocated when isOpen() is true.
Definition at line 302 of file Cube.h.
Referenced by addCachingAlgorithm(), cleanUp(), clearIoCache(), create(), Cube(), isOpen(), open(), read(), setVirtualBands(), write(), and writeLabels().
Pvl* Isis::Cube::m_label [private] |
The label if IsOpen(), otherwise NULL.
Definition at line 361 of file Cube.h.
Referenced by cleanUp(), create(), Cube(), deleteBlob(), isOpen(), label(), labelSize(), open(), reformatOldIsisLabel(), write(), and writeLabels().
int Isis::Cube::m_labelBytes [private] |
The maximum allowed size of the label; the allocated space.
Definition at line 364 of file Cube.h.
Referenced by create(), initialize(), labelSize(), open(), setLabelSize(), write(), and writeLabels().
QFile* Isis::Cube::m_labelFile [private] |
This is the file that contains the labels always; if labels are attached then this contains the file data also.
The method dataFile() will always give you the appropriate QFile member for reading cube data; this should always be used for the labels.
If isOpen() is true, then this is allocated.
Definition at line 290 of file Cube.h.
Referenced by cleanUp(), create(), Cube(), dataFile(), isOpen(), isReadOnly(), open(), reformatOldIsisLabel(), reopen(), write(), and writeLabels().
FileName* Isis::Cube::m_labelFileName [private] |
The full filename of the label file (.lbl or .cub).
Definition at line 335 of file Cube.h.
Referenced by cleanUp(), create(), Cube(), fileName(), isOpen(), open(), read(), realDataFileName(), reopen(), write(), and writeLabels().
int Isis::Cube::m_lines [private] |
The line count of the open cube or the cube that will be created.
Definition at line 370 of file Cube.h.
Referenced by create(), initialize(), lineCount(), and setDimensions().
double Isis::Cube::m_multiplier [private] |
The multiplier of the open cube or the cube that will be created; does not apply if m_pixelType is Real.
Definition at line 385 of file Cube.h.
Referenced by create(), initialize(), multiplier(), setBaseMultiplier(), and setMinMax().
QMutex* Isis::Cube::m_mutex [private] |
Basic thread-safety mutex; this class is not optimized for threads.
Definition at line 326 of file Cube.h.
Referenced by clearIoCache(), Cube(), read(), write(), writeLabels(), and ~Cube().
PixelType Isis::Cube::m_pixelType [private] |
This is the pixel type on disk.
If a cube is open, then this will be the opened cube's pixel type. Otherwise, if a cube is created with create(...) then this pixel type will be used. The default is Real.
Definition at line 323 of file Cube.h.
Referenced by create(), initialize(), pixelType(), setMinMax(), and setPixelType().
Projection* Isis::Cube::m_projection [private] |
Projection allocated from the projection() method.
Definition at line 332 of file Cube.h.
Referenced by Cube(), projection(), and ~Cube().
int Isis::Cube::m_samples [private] |
The sample count of the open cube or the cube that will be created.
Definition at line 367 of file Cube.h.
Referenced by create(), initialize(), sampleCount(), and setDimensions().
bool Isis::Cube::m_storesDnData [private] |
True (most common case) when the cube DN data is inside the file we're writing to.
False means we're referencing another cube's internal DN data for reading, and writing buffers is disallowed.
Definition at line 358 of file Cube.h.
Referenced by create(), initialize(), open(), realDataFileName(), and write().
FileName* Isis::Cube::m_tempCube [private] |
QList<int>* Isis::Cube::m_virtualBandList [private] |
If allocated, converts from physical on-disk band # to virtual band #.
Definition at line 388 of file Cube.h.
Referenced by bandCount(), cleanUp(), create(), Cube(), open(), physicalBand(), reopen(), and setVirtualBands().