12#include "IException.h"
14#include "SpecialPixel.h"
16#include "TableField.h"
48 const QString &name) :
_blobname(blobname),
77 const QString &fieldname,
78 const QString &name) :
143 if (data.isDouble()) {
146 else if (data.isInteger()) {
151 " is not double or integer";
152 throw IException(IException::Programmer, msg, _FILEINFO_);
168 int nlines = tbl.Records();
170 BlobBuf pixels(nlines, nsamps);
171 for (
int i = 0 ; i < nlines ; i++) {
173 for (
unsigned int j = 0 ; j < d.size() ; j++) {
194 int nlines = tbl.Records();
196 BlobBuf pixels(nlines, nsamps);
197 for (
int i = 0 ; i < nlines ; i++) {
199 for (
unsigned int j = 0 ; j < d.size(); j++) {
200 pixels[i][j] = int2ToDouble(d[j]);
217 double Blobber::int2ToDouble(
int value)
const {
218 if (value == NULL2)
return NULL8;
219 else if (value == LOW_REPR_SAT2)
return LOW_REPR_SAT8;
220 else if (value == LOW_INSTR_SAT2)
return LOW_INSTR_SAT8;
221 else if (value == HIGH_INSTR_SAT2)
return HIGH_INSTR_SAT8;
222 else if (value == HIGH_REPR_SAT2)
return HIGH_REPR_SAT8;
228 double Blobber::int2ToDouble(
unsigned int value)
const {
229 if (value == NULLUI4)
return NULL8;
230 else if (value == LOW_REPR_SATUI4)
return LOW_REPR_SAT8;
231 else if (value == LOW_INSTR_SATUI4)
return LOW_INSTR_SAT8;
232 else if (value == HIGH_INSTR_SATUI4)
return HIGH_INSTR_SAT8;
233 else if (value == HIGH_REPR_SATUI4)
return HIGH_REPR_SAT8;
QString getFieldName() const
Retreive the name of the field in the Tabel object BLOB.
QString _blobname
Name of BLOB to read.
QString _name
Name of this data set.
QString getBlobName() const
Retrieves the name of the Table object.
void loadInteger(Table &tbl)
Provides direct reading in of the field data from the BLOB.
void load(const QString &filename)
Loads the contents of a BLOB from a cube file.
TNT::Array2D< double > BlobBuf
Internal buffer uses TNT.
Blobber deepcopy() const
Create a unique copy of this blob.
QString _fieldname
Name of field in BLOB to read.
Blobber()
Default basic constructor that is mostly not useful.
void loadDouble(Table &tbl)
Provides direct reading in of the field data from the BLOB.
BlobBuf _buf
Buffer holding data.
IO Handler for Isis Cubes.
void open(const QString &cfile, QString access="r")
This method will try to open a file as either a cube or geotiff in either read or read/write.
Table readTable(const QString &name)
Read a Table from the cube.
This is free and unencumbered software released into the public domain.