|
Isis 3.0 Object Programmers' Reference |
Home |
#include <Cube.h>
Inheritance diagram for Isis::Cube:


This class is used to open, create, read, and write data from Isis cube files.
For internal use only.
Definition at line 109 of file Cube.h.
Public Member Functions | |
| Cube () | |
| Constructs a Cube object. | |
| virtual | ~Cube () |
| Destroys the Cube object. | |
| void | Open (const std::string &cfile, std::string access="r") |
| This method will open an isis sube for reading or reading/writing. | |
| void | ReOpen (std::string access="r") |
| This method will reopen an isis sube for reading or reading/writing. | |
| void | Create (const std::string &cfile) |
| This method will create an isis cube for writing. | |
| bool | IsOpen () |
| Returns if the cube is opened. | |
| bool | IsReadOnly () const |
| Returns if the cube is opened readonly. | |
| bool | IsReadWrite () const |
| Returns if the cube is opened read/write. | |
| void | Close (const bool remove=false) |
| Closes the cube and updates the labels. | |
| void | Read (Isis::Buffer &rbuf) |
| This method will read a buffer of data from the cube as specified by the contents of the Buffer object. | |
| void | Write (Isis::Buffer &wbuf) |
| This method will write a buffer of data from the cube as specified by the contents of the Buffer object. | |
| void | Read (Isis::Blob &blob) |
| This method will read data from the specified Blob object. | |
| void | Write (Isis::Blob &blob) |
| This method will write a blob of data (e.g. | |
| bool | BlobDelete (std::string BlobType, std::string BlobName) |
| This method will delete a blob label object from the cube as specified by the Blob type and name. | |
| std::string | Filename () const |
| Returns the expanded filename. | |
| Isis::Pvl * | Label () |
| Returns a pointer to the IsisLabel object associated with the cube. | |
| void | SetLabelBytes (int labelBytes) |
| Used prior to the Create method, this will allocate a specific number of bytes in the label area for attached files. | |
| void | SetDimensions (int ns, int nl, int nb) |
| Used prior to the Create method to specify the size of the cube. | |
| void | SetPixelType (Isis::PixelType pixelType) |
| Used prior to the Create method, this will specify the output pixel type. | |
| void | SetCubeFormat (Isis::CubeFormat cubeFormat) |
| Used prior to the Create method, this will specify the format of the cube, either band, sequential or tiled. | |
| void | SetByteOrder (Isis::ByteOrder byteOrder) |
| Used prior to the Create method, this will specify the byte order of pixels, either least or most significant byte. | |
| 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 | 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 | SetAttached () |
| Used prior to the Create method, this will specify that the labels and data will be in one file. | |
| void | SetDetached () |
| Used prior to the Create method, this will specify that the labels and data will be in separate files. | |
| int | LabelBytes () const |
| Returns the number of bytes reserved for the label. | |
| int | LabelBytesUsed () |
| Returns the number of bytes used by the label. | |
| int | Samples () const |
| Returns the number of samples in the cube. | |
| int | Lines () const |
| Returns the number of lines in the cube. | |
| int | Bands () const |
| Returns the number of bands in the cube. | |
| Isis::PixelType | PixelType () const |
| Returns an enumeration of the PixelType. | |
| Isis::CubeFormat | CubeFormat () const |
| Returns an enumeration of the cube format (tiled or bsq). | |
| Isis::ByteOrder | ByteOrder () const |
| Returns an enumeration of the byte order (Isb or Msb). | |
| bool | IsAttached () const |
| Returns if the cube and label data are in the same file. | |
| bool | IsDetached () const |
| Returns if the cube and label data are in separate files. | |
| double | Base () const |
| Returns the base value for converting 8-bit/16-bit pixels to 32-bit. | |
| double | Multiplier () const |
| Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit. | |
| void | SetVirtualBands (const std::vector< std::string > &vbands) |
| Used prior to the Open method, this allows the programmer to specify a subset of bands to work with. | |
| int | PhysicalBand (const int virtualBand) const |
| This method will return the physical band number given a virtual band number. | |
| bool | HasProjection () |
| Returns true if the labels of the cube appear to have a valid mapping group. | |
| Isis::Camera * | Camera () |
| Return a camera associated with the cube. | |
| Isis::Projection * | Projection () |
| Return a projection associated with the cube. | |
| Isis::Statistics * | Statistics (const int band=1, std::string 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. | |
| Isis::Statistics * | Statistics (const int band, const double validMin, const double validMax, std::string 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. | |
| Isis::Histogram * | Histogram (const int band=1, std::string 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. | |
| Isis::Histogram * | Histogram (const int band, const double validMin, const double validMax, std::string 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. | |
| void | PutGroup (Isis::PvlGroup &group) |
| Adds a group in a Label to the cube. | |
| Isis::PvlGroup & | GetGroup (const std::string &group) |
| Read a group from the cube into a Label. | |
| void | DeleteGroup (const std::string &group) |
| Deletes a group from the cube labels. | |
| bool | HasGroup (const std::string &group) |
| Return if the cube has a specified group in the labels. | |
| bool | HasTable (const std::string &name) |
| Check to see if the cube contains a pvl table by the provided name. | |
Private Member Functions | |
| void | WriteLabels () |
| void | ReformatOldIsisLabel (const std::string &oldCube) |
| void | OpenCheck () |
| void | SetVirtualBands () |
| Used prior to the Open method this allows the programmer to specify a subset of bands to work with. | |
Private Attributes | |
| IsisCubeDef | p_cube |
| Isis::CubeIoHandler * | p_ioHandler |
| bool | p_overwritePreference |
| bool | p_historyPreference |
| bool | p_attachedPreference |
| BigInt | p_maxSizePreference |
| std::vector< std::string > | p_virtualBandList |
| std::string | p_tempCube |
| std::string | p_formatTemplateFile |
| Isis::Camera * | p_camera |
| Isis::Projection * | p_projection |
| Cube::Cube | ( | ) |
Constructs a Cube object.
Definition at line 46 of file Cube.cpp.
References Isis::PvlContainer::Clear(), Isis::PvlObject::FindGroup(), Isis::IsBigEndian(), Isis::IsLittleEndian(), Isis::Preference::Preferences(), and Isis::iString::UpCase().
| int Cube::Bands | ( | ) | const |
Returns the number of bands in the cube.
Note that this is the number of virtual bands if the Open method was used.
Definition at line 759 of file Cube.cpp.
Referenced by Qisis::CubeViewport::cubeBands(), Qisis::CubeViewport::CubeViewport(), Isis::Histogram::InitializeFromCube(), Isis::Process::SetInputCube(), and Isis::ProcessMapMosaic::SetOutputCube().
| double Isis::Cube::Base | ( | ) | const [inline] |
Returns the base value for converting 8-bit/16-bit pixels to 32-bit.
Definition at line 246 of file Cube.h.
References IsisCubeDef::base, and p_cube.
Referenced by Isis::Histogram::InitializeFromCube().
| bool Cube::BlobDelete | ( | std::string | BlobType, | |
| std::string | 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 |
| Isis::ByteOrder Isis::Cube::ByteOrder | ( | ) | const [inline] |
Returns an enumeration of the byte order (Isb or Msb).
Definition at line 219 of file Cube.h.
References IsisCubeDef::byteOrder, and p_cube.
| Isis::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 917 of file Cube.cpp.
Referenced by Isis::ImagePolygon::Create(), Isis::Chip::Load(), and Isis::CameraPointInfo::SetCube().
| void Cube::Close | ( | const 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 519 of file Cube.cpp.
Referenced by Qisis::MosaicItem::createFootprint(), Qisis::MosaicItem::drawImage(), Isis::ImageOverlapSet::FindImageOverlaps(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::GuiCubeParameter::ViewCube(), Isis::GuiCubeParameter::ViewLabel(), and Qisis::ScatterPlotData::~ScatterPlotData().
| void Cube::Create | ( | const std::string & | cfile | ) |
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
| cfile | 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 365 of file Cube.cpp.
References _FILEINFO_, Isis::Filename::AddExtension(), Isis::PvlObject::AddObject(), Isis::ByteOrderName(), core(), Isis::Filename::Expanded(), Isis::iException::Message(), Isis::Filename::Name(), Isis::PixelTypeName(), Isis::Filename::RemoveExtension(), size, and Isis::SizeOf().
| Isis::CubeFormat Isis::Cube::CubeFormat | ( | ) | const [inline] |
Returns an enumeration of the cube format (tiled or bsq).
Definition at line 211 of file Cube.h.
References IsisCubeDef::cubeFormat, and p_cube.
| void Cube::DeleteGroup | ( | const std::string & | 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 1195 of file Cube.cpp.
References Isis::PvlObject::DeleteGroup(), and Isis::PvlObject::HasGroup().
| std::string Isis::Cube::Filename | ( | ) | const [inline] |
Returns the expanded filename.
Definition at line 151 of file Cube.h.
References IsisCubeDef::labelFile, and p_cube.
Referenced by Isis::ImagePolygon::Create(), Qisis::CubeViewport::CubeViewport(), Isis::CameraPointInfo::GetPointInfo(), Isis::Chip::Load(), Qisis::CubeViewport::setCaption(), Qisis::MeasureTool::updateDist(), and Qisis::AdvancedTrackTool::updateRow().
| Isis::PvlGroup & Cube::GetGroup | ( | const std::string & | group | ) |
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 1182 of file Cube.cpp.
References Isis::PvlObject::FindGroup().
Referenced by HiLab::HiLab().
| bool Cube::HasGroup | ( | const std::string & | group | ) |
Return if the cube has a specified group in the labels.
| [out] | group | Name of the group to check. |
Definition at line 1208 of file Cube.cpp.
References Isis::PvlObject::HasGroup().
Referenced by Isis::AlphaCube::UpdateGroup().
| bool Cube::HasProjection | ( | ) |
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.
| bool Cube::HasTable | ( | const std::string & | 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 955 of file Cube.cpp.
References Isis::iString::UpCase().
| Isis::Histogram * Cube::Histogram | ( | const int | band, | |
| const double | validMin, | |||
| const double | validMax, | |||
| std::string | 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 1100 of file Cube.cpp.
References _FILEINFO_, Isis::Histogram::AddData(), Isis::Histogram::BinRangeEnd(), Isis::Histogram::BinRangeStart(), Isis::Progress::CheckStatus(), line, Isis::iException::Message(), Isis::Histogram::SetBinRange(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Statistics::SetValidRange(), Isis::ValidMaximum, and Isis::ValidMinimum.
| Isis::Histogram * Cube::Histogram | ( | const int | band = 1, |
|
| std::string | 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 1070 of file Cube.cpp.
References Isis::ValidMaximum, and Isis::ValidMinimum.
Referenced by Qisis::MosaicItem::getStretch().
| bool Isis::Cube::IsAttached | ( | ) | const [inline] |
Returns if the cube and label data are in the same file.
Definition at line 227 of file Cube.h.
References IsisCubeDef::attached, and p_cube.
| bool Isis::Cube::IsDetached | ( | ) | const [inline] |
Returns if the cube and label data are in separate files.
Definition at line 235 of file Cube.h.
References IsisCubeDef::attached, and p_cube.
| bool Isis::Cube::IsOpen | ( | ) | [inline] |
Returns if the cube is opened.
Definition at line 123 of file Cube.h.
References p_cube, and IsisCubeDef::stream.
Referenced by Qisis::CubeViewport::CubeViewport().
| bool Isis::Cube::IsReadOnly | ( | ) | const [inline] |
Returns if the cube is opened readonly.
Default more for Open method.
Definition at line 130 of file Cube.h.
References IsisCubeDef::access, and p_cube.
Referenced by Qisis::EditTool::mouseButtonRelease(), Qisis::EditTool::redoEdit(), Qisis::EditTool::rubberBandComplete(), Qisis::EditTool::undoAll(), and Qisis::EditTool::undoEdit().
| bool Isis::Cube::IsReadWrite | ( | ) | const [inline] |
Returns if the cube is opened read/write.
Definition at line 137 of file Cube.h.
References IsisCubeDef::access, and p_cube.
Referenced by Isis::ProcessByBrick::StartProcess().
| Isis::Pvl* Isis::Cube::Label | ( | ) | [inline] |
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.
Definition at line 162 of file Cube.h.
References IsisCubeDef::label, and p_cube.
Referenced by Isis::SerialNumber::Compose(), Isis::ObservationNumber::Compose(), Qisis::MosaicItem::createFootprint(), Isis::ProjectionFactory::CreateFromCube(), Qisis::PlotTool::getSpectralStatistics(), Isis::Sensor::Sensor(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::UniversalGroundMap::UniversalGroundMap(), Qisis::PlotTool::updateTool(), Qisis::BandTool::updateTool(), and Isis::GuiCubeParameter::ViewLabel().
| int Isis::Cube::LabelBytes | ( | ) | const [inline] |
Returns the number of bytes reserved for the label.
Definition at line 179 of file Cube.h.
References IsisCubeDef::labelBytes, and p_cube.
| int Cube::LabelBytesUsed | ( | ) |
| int Isis::Cube::Lines | ( | ) | const [inline] |
Returns the number of lines in the cube.
Definition at line 194 of file Cube.h.
References IsisCubeDef::lines, and p_cube.
Referenced by Isis::ImagePolygon::Create(), Qisis::CubeViewport::cubeContentsChanged(), Qisis::CubeViewport::cubeLines(), Qisis::CubeViewport::CubeViewport(), Qisis::MosaicItem::drawImage(), Qisis::ViewportBuffer::hasEntireCube(), Isis::Histogram::InitializeFromCube(), Qisis::EditTool::mouseButtonRelease(), Isis::Chip::Read(), Qisis::ScatterPlotData::ScatterPlotData(), Isis::CameraPointInfo::SetCenter(), Isis::Process::SetInputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::CameraPointInfo::SetSample(), Isis::ProcessMapMosaic::StartProcess(), and Isis::TileManager::TileManager().
| double Isis::Cube::Multiplier | ( | ) | const [inline] |
Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit.
Definition at line 257 of file Cube.h.
References IsisCubeDef::multiplier, and p_cube.
Referenced by Isis::Histogram::InitializeFromCube().
| void Cube::Open | ( | const std::string & | cfile, | |
| std::string | access = "r" | |||
| ) |
This method will open an isis sube for reading or reading/writing.
| [in] | cfile | 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. |
| [in] | access | (Default value of "r") Defines how the cube will be accessed. Either readonly "r" or read-write "rw". |
Definition at line 114 of file Cube.cpp.
References _FILEINFO_, Isis::Filename::AddExtension(), Isis::ByteOrderEnumeration(), core(), e, Isis::Filename::Expanded(), Isis::Message::FileOpen(), Isis::iException::Message(), Isis::Filename::Path(), Isis::PixelTypeEnumeration(), Isis::Filename::RemoveExtension(), and Isis::PvlKeyword::Unit().
Referenced by Isis::ProcessPolygons::AppendOutputCube(), Qisis::MosaicItem::createFootprint(), Qisis::MosaicItem::displayControlPoints(), Qisis::MosaicItem::drawImage(), Isis::ImageOverlapSet::FindImageOverlaps(), Isis::Blobber::load(), Isis::Process::SetInputCube(), Isis::ProcessMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::GuiCubeParameter::ViewCube(), and Isis::GuiCubeParameter::ViewLabel().
| 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 574 of file Cube.cpp.
References _FILEINFO_, and Isis::iException::Message().
| Isis::PixelType Isis::Cube::PixelType | ( | ) | const [inline] |
Returns an enumeration of the PixelType.
Definition at line 203 of file Cube.h.
References p_cube, and IsisCubeDef::pixelType.
Referenced by Isis::ImagePolygon::Create(), Qisis::CubeViewport::CubeViewport(), Qisis::ViewportBuffer::fillBuffer(), Qisis::MosaicItem::getPixelValue(), Isis::CameraPointInfo::GetPointInfo(), Qisis::PlotTool::getSpatialStatistics(), Qisis::StatisticsTool::getStatistics(), Isis::Histogram::InitializeFromCube(), Isis::ProcessExportPds::LineBytes(), Qisis::EditTool::mouseButtonRelease(), Isis::Chip::Read(), Qisis::EditTool::redoEdit(), Qisis::ScatterPlotData::ScatterPlotData(), Isis::Sensor::Sensor(), Qisis::EditTool::undoEdit(), and Qisis::EditTool::writeToCube().
| Isis::Projection * Cube::Projection | ( | ) |
Return 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.
Definition at line 941 of file Cube.cpp.
Referenced by Isis::ImagePolygon::Create(), Qisis::CubeViewport::CubeViewport(), Isis::Chip::Load(), and Isis::ProcessMapMosaic::StartProcess().
| void Cube::PutGroup | ( | Isis::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.
| IsisProgrammerError | The programmer attempted to overwrite the Cube group. |
| [in] | group | Label containing the group to put. |
Definition at line 1165 of file Cube.cpp.
References Isis::PvlObject::AddGroup(), Isis::PvlObject::FindGroup(), Isis::PvlObject::HasGroup(), and Isis::PvlContainer::Name().
Referenced by Isis::ProcessMapMosaic::SetOutputCube().
| void Cube::Read | ( | Isis::Blob & | blob | ) |
This method will read data from the specified Blob object.
| [in] | blob | The Blob data to be loaded |
Definition at line 829 of file Cube.cpp.
References _FILEINFO_, Isis::iException::Message(), and Isis::Blob::Read().
| void Cube::Read | ( | Isis::Buffer & | rbuf | ) |
This method will read a buffer of data from the cube as specified by the contents of the Buffer object.
| rbuf | Buffer to be loaded |
Definition at line 481 of file Cube.cpp.
References _FILEINFO_, and Isis::iException::Message().
Referenced by Qisis::CubeViewport::bluePixel(), Qisis::MosaicItem::createFootprint(), Isis::Sensor::DemRadius(), Qisis::ViewportBuffer::fillBuffer(), Isis::ImageOverlapSet::FindImageOverlaps(), Qisis::MosaicItem::getPixelValue(), Isis::CameraPointInfo::GetPointInfo(), Qisis::PlotTool::getSpatialStatistics(), Qisis::StatisticsTool::getStatistics(), Qisis::CubeViewport::grayPixel(), Qisis::CubeViewport::greenPixel(), Isis::Histogram::InitializeFromCube(), Isis::Blobber::load(), Qisis::EditTool::mouseButtonRelease(), Isis::Chip::Read(), Qisis::EditTool::redoEdit(), Qisis::CubeViewport::redPixel(), Qisis::ScatterPlotData::ScatterPlotData(), Isis::ImagePolygon::SetImage(), Isis::ProcessByBrick::StartProcess(), Qisis::EditTool::undoEdit(), and Qisis::EditTool::writeToCube().
| void Cube::ReOpen | ( | std::string | 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 | (std::string) Type of access needed (read or read/write |
Definition at line 288 of file Cube.cpp.
References _FILEINFO_, e, and Isis::iException::Message().
Referenced by Qisis::EditTool::mouseButtonRelease(), and Qisis::EditTool::rubberBandComplete().
| int Isis::Cube::Samples | ( | ) | const [inline] |
Returns the number of samples in the cube.
Definition at line 187 of file Cube.h.
References p_cube, and IsisCubeDef::samples.
Referenced by Isis::ImagePolygon::Create(), Qisis::CubeViewport::cubeContentsChanged(), Qisis::CubeViewport::cubeSamples(), Qisis::CubeViewport::CubeViewport(), Qisis::MosaicItem::drawImage(), Qisis::ViewportBuffer::hasEntireCube(), Isis::ProcessExportPds::LineBytes(), Qisis::EditTool::mouseButtonRelease(), Isis::CubeCalculator::PrepareCalculations(), Isis::Chip::Read(), Qisis::ScatterPlotData::ScatterPlotData(), Isis::CameraPointInfo::SetCenter(), Isis::Process::SetInputCube(), Isis::CameraPointInfo::SetLine(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessMapMosaic::StartProcess(), and Isis::TileManager::TileManager().
| void Cube::SetAttached | ( | ) |
| void Cube::SetBaseMultiplier | ( | double | base, | |
| double | mult | |||
| ) |
| void Cube::SetByteOrder | ( | Isis::ByteOrder | byteOrder | ) |
| void Cube::SetCubeFormat | ( | Isis::CubeFormat | cubeFormat | ) |
| void Cube::SetDetached | ( | ) |
| 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 637 of file Cube.cpp.
References _FILEINFO_, and Isis::iException::Message().
Referenced by Isis::Process::SetOutputCube().
| void Cube::SetLabelBytes | ( | int | labelBytes | ) |
| 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 694 of file Cube.cpp.
References base, Isis::VALID_MAX1, Isis::VALID_MAX2, Isis::VALID_MIN1, and Isis::VALID_MIN2.
| void Cube::SetPixelType | ( | Isis::PixelType | pixelType | ) |
| void Cube::SetVirtualBands | ( | ) | [private] |
Used prior to the Open method this allows the programmer to specify a subset of bands to work with.
Definition at line 783 of file Cube.cpp.
References _FILEINFO_, band, e, and Isis::iException::Message().
| void Cube::SetVirtualBands | ( | const std::vector< std::string > & | vbands | ) |
Used prior to the Open method, this allows the programmer to specify a subset of bands to work with.
For example, if the programmer only wants to work with band 5 out of a 10 band cube, this can be accommodated. In the future, this method will accept BandBin FilterName as well as band numbers.
| [in] | vbands | A vector of strings containing the virtual bands. The bands will be verified when the cube is opened. For now, the vector must contain integers (e.g., "5", "10", "1"). |
Definition at line 773 of file Cube.cpp.
Referenced by Isis::Process::SetInputCube().
| Isis::Statistics * Cube::Statistics | ( | const int | band, | |
| const double | validMin, | |||
| const double | validMax, | |||
| std::string | 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 1010 of file Cube.cpp.
References _FILEINFO_, Isis::Statistics::AddData(), Isis::Progress::CheckStatus(), line, Isis::iException::Message(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::Statistics::SetValidRange(), and stats.
| Isis::Statistics * Cube::Statistics | ( | const int | band = 1, |
|
| std::string | 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 989 of file Cube.cpp.
References Isis::ValidMaximum, and Isis::ValidMinimum.
| void Cube::Write | ( | Isis::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 843 of file Cube.cpp.
References _FILEINFO_, Isis::Filename::AddExtension(), Isis::Filename::Expanded(), in, Isis::iException::Message(), Isis::Filename::Name(), Isis::Blob::Name(), Isis::Filename::RemoveExtension(), Isis::Blob::Type(), and Isis::Blob::Write().
| void Cube::Write | ( | Isis::Buffer & | wbuf | ) |
This method will write a buffer of data from the cube as specified by the contents of the Buffer object.
| wbuf | Buffer to be written. |
Definition at line 498 of file Cube.cpp.
References _FILEINFO_, and Isis::iException::Message().
Referenced by Qisis::EditTool::redoEdit(), Isis::ProcessByBrick::StartProcess(), Qisis::EditTool::undoAll(), Qisis::EditTool::undoEdit(), Isis::Process::WriteHistory(), and Qisis::EditTool::writeToCube().