42 class CubeAttributeOutput;
43 class CubeCachingAlgorithm;
243 void close(
bool remove =
false);
245 void create(
const QString &cfile);
247 void open(
const QString &cfile, QString access =
"r");
248 void reopen(QString access =
"r");
278 QString msg =
"Gathering histogram");
280 const double &validMax,
281 QString msg =
"Gathering histogram");
283 int labelSize(
bool actual =
false)
const;
291 QString msg =
"Gathering statistics");
293 const double &validMax,
294 QString msg =
"Gathering statistics");
299 bool deleteBlob(QString BlobType, QString BlobName);
305 void latLonRange(
double &minLatitude,
double &maxLatitude,
double &minLongitude,
306 double &maxLongitude);
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 vario...
int m_labelBytes
The maximum allowed size of the label; the allocated space.
Buffer for reading and writing cube data.
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...
virtual 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 variou...
void construct()
Initialize members from their initial undefined states.
Pvl * m_label
The label if IsOpen(), otherwise NULL.
bool isProjected() const
Returns true if the labels of the cube appear to have a valid mapping group.
bool storesDnData() const
This method returns a boolean value.
File name manipulation and expansion.
virtual ~Cube()
Destroys the Cube object.
Camera * camera()
Return a camera associated with the cube.
double base() const
Returns the base value for converting 8-bit/16-bit pixels to 32-bit.
bool m_attached
True if labels are attached.
void applyVirtualBandsToLabel()
Applies virtual bands to label.
void openCheck()
Throw an exception if the cube is not open.
void setFormat(Format format)
Used prior to the Create method, this will specify the format of the cube, either band...
CubeIoHandler * m_ioHandler
This does the heavy lifting for cube DN IO and is always allocated when isOpen() is true...
double m_base
The base of the open cube or the cube that will be created; does not apply if m_pixelType is Real...
ByteOrder
Tests the current architecture for byte order.
int m_bands
The band count of the open cube or the cube that will be created.
FileName * m_tempCube
If open was called with an Isis 2 cube, then this will be the name of the imported Isis3 cube...
bool isOpen() const
Test if a cube file has been opened/created.
void setLabelsAttached(bool attached)
Use prior to calling create, this sets whether or not to use separate label and data files...
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
bool labelsAttached() const
Test if labels are attached.
FileName * m_formatTemplateFile
Label pvl format template file (describes how to format labels)
Projection * projection()
void initialize()
This sets Cube to its default state: Native byte order Format = Tile PixelType = Real (4 bytes per pi...
void setDimensions(int ns, int nl, int nb)
Used prior to the Create method to specify the size of the cube.
void initCoreFromLabel(const Pvl &label)
This function initializes the Cube core from a Pvl Label passed as a parameter.
PixelType
Enumerations for Isis Pixel Types.
Handles converting buffers to and from disk.
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
void reopen(QString access="r")
This method will reopen an isis sube for reading or reading/writing.
QFile * dataFile() const
This returns the QFile with cube DN data in it.
This class is used to accumulate statistics on double arrays.
FileName * m_dataFileName
The full filename of the data file (.cub)
Base class for Map Projections.
bool isReadWrite() const
Test if the opened cube is read-write, that is read and write operations should succeed if this is tr...
Cubes are stored in tile format, that is the order of the pixels in the file (on disk) is BSQ within ...
void setPixelType(PixelType pixelType)
Used prior to the Create method, this will specify the output pixel type.
PixelType m_pixelType
This is the pixel type on disk.
FileName * m_labelFileName
The full filename of the label file (.lbl or .cub)
bool hasTable(const QString &name)
Check to see if the cube contains a pvl table by the provided name.
Container of a cube histogram.
bool hasGroup(const QString &group) const
Return if the cube has a specified group in the labels.
Contains multiple PvlContainers.
void setVirtualBands(const QList< QString > &vbands)
This allows the programmer to specify a subset of bands to work with.
FileName realDataFileName() const
This gets the file name of the file which actually contains the DN data.
Manipulate and parse attributes of output cube filenames.
void setBaseMultiplier(double base, double mult)
Used prior to the Create method, this will specify the base and multiplier for converting 8-bit/16-bi...
void writeLabels()
Write the Pvl labels to the cube's label file.
bool isReadOnly() const
Test if the opened cube is read-only, that is write operations will fail if this is true...
void close(bool remove=false)
Closes the cube and updates the labels.
QList< int > * m_virtualBandList
If allocated, converts from physical on-disk band # to virtual band #.
void read(Blob &blob) const
This method will read data from the specified Blob object.
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
Cube * copy(FileName newFile, const CubeAttributeOutput &newFileAttributes)
Copies the cube to the new fileName.
Cube()
Constructs a Cube object.
QFile * m_dataFile
This is only sometimes allocated.
void addCachingAlgorithm(CubeCachingAlgorithm *)
This will add the given caching algorithm to the list of attempted caching algorithms.
Pvl realDataFileLabel() const
Function to read data from a cube label and return it as a PVL object.
QFile * m_labelFile
This is the file that contains the labels always; if labels are attached then this contains the file ...
Container for cube-like labels.
PixelType pixelType() const
void setByteOrder(ByteOrder byteOrder)
Used prior to the Create method, this will specify the byte order of pixels, either least or most sig...
Camera * m_camera
Camera allocated from the camera() method.
Cubes are stored in band-sequential format, that is the order of the pixels in the file (on disk) is:...
void setMinMax(double min, double max)
Used prior to the Create method, this will compute a good base and multiplier value given the minimum...
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
void clearIoCache()
This will clear excess RAM used for quicker IO in the cube.
int m_samples
The sample count of the open cube or the cube that will be created.
Format m_format
If isOpen() then this is the IO format that the cube uses.
void reformatOldIsisLabel(const QString &oldCube)
This is a helper, used by open(...), that handles opening Isis 2 cubes as if they were Isis 3 cubes...
virtual QString fileName() const
Returns the opened cube's filename.
void initLabelFromFile(FileName labelFileName, bool readWrite)
This function initializes the Cube label from a file passed as a parameter.
void write(Blob &blob)
This method will write a blob of data (e.g.
QMutex * m_mutex
Basic thread-safety mutex; this class is not optimized for threads.
void relocateDnData(FileName dnDataFile)
Relocates the DN data for a cube to an external cube label file.
Projection * m_projection
Projection allocated from the projection() method.
void cleanUp(bool remove)
This clears all of the allocated memory associated with an open cube.
Namespace for ISIS/Bullet specific routines.
virtual int bandCount() const
Returns the number of virtual bands for the cube.
void setExternalDnData(FileName cubeFileWithDnData)
Used to set external dn data to cube.
void putGroup(const PvlGroup &group)
Adds a group in a Label to the cube.
ByteOrder byteOrder() const
Returns the byte order/endian-ness of the cube file.
int labelSize(bool actual=false) const
Returns the number of bytes used by the label.
bool m_storesDnData
True (most common case) when the cube DN data is inside the file we're writing to.
int m_lines
The line count of the open cube or the cube that will be created.
double m_multiplier
The multiplier of the open cube or the cube that will be created; does not apply if m_pixelType is Re...
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 ...
void deleteGroup(const QString &group)
Deletes a group from the cube labels.
void latLonRange(double &minLatitude, double &maxLatitude, double &minLongitude, double &maxLongitude)
Returns the latitude and longitude range for the Cube.
void create(const QString &cfile)
This method will create an isis cube for writing.
Format
These are the possible storage formats of Isis3 cubes.
This is the parent of the caching algorithms
FileName externalCubeFileName() const
If this is an external cube label file, this will give you the cube dn file that this label reference...
virtual int physicalBand(const int &virtualBand) const
This method will return the physical band number given a virtual band number.
void setLabelSize(int labelBytes)
Used prior to the Create method, this will allocate a specific number of bytes in the label area for ...
double multiplier() const
Returns the multiplier value for converting 8-bit/16-bit pixels to 32-bit.
IO Handler for Isis Cubes.