SGFSpace objects define the geometry and attributes of uniform rectilinear grids
int | Dim () const returns dimension = total number of samples |
double | Vol () const returns volume of basic grid cell |
SGFSpace_d* | Intersect ( const SGFSpace_d & B ) const intersection of this SGFSpace with another |
Constructors
| |||||||||||||||||
Access to header table
|
SGFSpace objects define the geometry and attributes of uniform rectilinear grids. The class accomodates up to 9-dimensional data, and records its organization and any auxiliary scalar information required to properly interpret the data. Vectors in an SGFSpace are SGFVector_ds.
Motivated by and designed after the Stanford Exploration Project ``classic'' seismic disk data format. After seismic usage, grid geometry and auxiliary information are ``headers'' or ``header words'' in this documentation.
Double and single precision versions defined. The description below refers to the double precision class SGFSpace_d. In single precision, all doubles change to doubles, otherwise everything is the same. SGFSpace stores header words (grid parameters etc.) internally in a parameter table, which is an instance of an AbstractTable object. The table is read-only data: access is provided through a const reference (method ParametersRef()) and through returning a pointer to an independent copy (method Parameters()). Neither of these access methods permit the user to alter the parameters of the SGFSpace object. Creating a new SGFSpace with a new parameter table having only a few differences with that of the current SGFSpace - a fairly frequently occurring task - might be accomplished with code resembling this fragment:
AbstractTable * tnew = oldsp.Parameters(); tnew->PutValue("WineType","Beaujolais"); SGFSpace * newsp = new SGFSpace(tnew); HCL_delete(tnew);Note that Parameters allocates storage, which the calling locus of control must manage.Required header words:
- number of samples in each direction: int n1,n2,..., ndim
- step size in each direction: double d1,d2,..., ddim
- coordinate of first sample in each direction: double o1, o2,..., odim
Optional header words:
- data dimension: int dim (if not present, inferred from dimensional parameters)
- data type identifier: int esize = 8 for double precision, 4 for single precision [provided for backward compatibility with other software reading SEP disk data format]
- name of data file (NULL or arbitrary for definition of Space only): char * in
- any user-specified integer, real (double or double) or string data (``attributes'') needed for proper interpretation of the data in the particular SGFSpace.
Notes:
- The in string should be the filename of the binary data, when the SGFSpace object is the SGFSpace of an SGFVector_d. To define the space by itself (i.e. the grid plus its additional attributes, if any), initialize this string arbitrarily (eg. to "NULL"), or simply leave this parameter out of the list.
Example: The following file, input to the SGFSpace usual constructor, constructs an SGFSpace implementing a 2-dimensional grid having additional attributes of WaterDepth and WineType.
Since no binary data filename appears (in=...), this file is suitable only to define an SGFSpace. A similar file specifying a vector in this space would include instead an actual filename (in=<filename>) as a ``pointer - to - data''.
n1=101 n2=201 d1=0.01 d2=27.9 o1=0.0 o2=34723.39487 WaterDepth=154.5 WineType=VinRougeOrdinaire
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de