12#include "IException.h"
14#include "SpecialPixel.h"
16#include "TableField.h"
48 const QString &name) : _blobname(blobname),
49 _fieldname(fieldname), _name(name) {
77 const QString &fieldname,
78 const QString &name) :
80 _fieldname(fieldname),
151 " is not double or integer";
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;
Base class for accessing ISIS blobs.
QString getFieldName() const
Retreive the name of the field in the Tabel object BLOB.
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.
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 open an existing isis cube for reading or reading/writing.
Table readTable(const QString &name)
Read a Table from the cube.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Class for storing an Isis::Table's field information.
bool isInteger() const
Determines whether the field type is Integer.
bool isDouble() const
Determines whether the field type is Double.
Class for storing Table blobs information.
This is free and unencumbered software released into the public domain.