Go to the documentation of this file.
28 #ifndef TABLES_COMPRESSFLOAT_H
29 #define TABLES_COMPRESSFLOAT_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
34 #include <casacore/tables/Tables/ScalarColumn.h>
35 #include <casacore/casa/Arrays/Array.h>
149 const String& storedColumnName,
164 const String& storedColumnName,
165 const String& scaleColumnName,
166 const String& offsetColumnName,
static void registerClass()
Register the class name and the static makeObject "constructor".
Specify which elements to extract from an n-dimensional array.
void scaleColumnOnPut(const Array< Float > &array, Array< Short > &target)
Scale and/or offset array to target for the entire column.
virtual void getColumnSlice(const Slicer &slicer, Array< Float > &array)
Get a section of all arrays in the column.
Abstract base class for a data manager.
Templated virtual column engine for a table array of any type.
void scaleOnGet(Float scale, Float offset, Array< Float > &array, const Array< Short > &target)
Scale and/or offset target to array.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
virtual DataManager * clone() const
Clone the engine object.
virtual void getArrayColumnCells(const RefRows &rownrs, Array< Float > &data)
Get some array values in the column.
virtual void putArray(uInt rownr, const Array< Float > &array)
Put an array in the given row.
virtual void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
virtual void putColumnSlice(const Slicer &slicer, const Array< Float > &array)
Put a section of all arrays in the column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< Float > &data)
Get a section of some arrays in the column.
Float getOffset(uInt rownr)
Get the offset value for this row.
CompressFloat(const String &virtualColumnName, const String &storedColumnName, Float scale, Float offset=0)
Construct an engine to scale all arrays in a column with the given offset and scale factor.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
void scaleOnPut(Float scale, Float offset, const Array< Float > &array, Array< Short > &target)
Scale and/or offset array to target.
Class holding the row numbers in a RefTable.
Virtual column engine to scale a table float array.
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< Float > &data)
Put into a section of some arrays in the column.
ScalarColumn< Float > * offsetColumn_p
void findMinMax(Float &minVal, Float &maxVal, const Array< Float > &array) const
Find minimum and maximum from the array data.
virtual void getSlice(uInt rownr, const Slicer &slicer, Array< Float > &array)
Get a section of the array in the given row.
this file contains all the compiler specific defines
virtual void getArray(uInt rownr, Array< Float > &array)
Get an array in the given row.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
Float getScale(uInt rownr)
Get the scale value for this row.
~CompressFloat()
Destructor is mandatory.
void putFullPart(uInt rownr, const Slicer &slicer, Array< Float > &fullArray, const Array< Float > &partArray, Float minVal, Float maxVal)
Fill the array part into the full array and put it using the given min/max values.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual void putSlice(uInt rownr, const Slicer &slicer, const Array< Float > &array)
Put into a section of the array in the given row.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< Float > &data)
Put some array values in the column.
void makeScaleOffset(Float &scale, Float &offset, Float minVal, Float maxVal) const
Make scale and offset from the minimum and maximum of the array data.
A hierarchical collection of named fields of various types.
static String className()
Return the name of the class.
virtual void reopenRW()
Reopen the engine for read/write access.
virtual void addRowInit(uInt startRow, uInt nrrow)
Add rows to the table.
virtual void create(uInt initialNrrow)
Initialize the object for a new table.
CompressFloat & operator=(const CompressFloat &)
Assignment is not needed and therefore forbidden (so it is made private and not implemented).
virtual void getArrayColumn(Array< Float > &array)
Get an entire column.
void scaleColumnOnGet(Array< Float > &array, const Array< Short > &target)
Scale and/or offset target to array for the entire column.
void putPart(uInt rownr, const Slicer &slicer, const Array< Float > &array, Float scale, Float offset)
Put a part of an array in a row using given scale/offset values.
ScalarColumn< Float > * scaleColumn_p
virtual void putArrayColumn(const Array< Float > &array)
Put an entire column.