OEScalarGrid

class OEScalarGrid : public OEGrid<float>

This class represents OEScalarGrid.

An OEScalarGrid represents a cubic grid with regular intervals in Cartesian space.

The following methods are publicly inherited from OEGrid:

operator=

SetAll

SetXMid

Clear

SetDim

SetYDim

CreateCopy

SetMid

SetYMid

GetDataType

SetSpacing

SetZDim

IsDataType

SetXDim

SetZMid

The following methods are publicly inherited from OEFixedGrid:

operator()

GetDataType

SetValues

operator[]

GetValues

CreateCopy

IsDataType

The following methods are publicly inherited from OEGridBase:

Clear

GetXMid

GetZMin

CreateCopy

GetXMin

GridIdxToElement

ElementToGridIdx

GetY

GridIdxToSpatialCoord

ElementToSpatialCoord

GetYDim

IsDataType

GetDataType

GetYIdx

IsInGrid

GetDim

GetYInc

IsSpacingSet

GetMid

GetYMax

IsTitleSet

GetSize

GetYMid

IsXMidSet

GetSpacing

GetYMin

IsYMidSet

GetTitle

GetZ

IsZMidSet

GetX

GetZDim

SetTitle

GetXDim

GetZIdx

SpatialCoordToElement

GetXIdx

GetZInc

SpatialCoordToGridIdx

GetXInc

GetZMax

GetXMax

GetZMid

The following methods are publicly inherited from OEGridAbstractBase:

Clear

GetTitle

GetZMid

GetDataType

GetXDim

IsDataType

GetDim

GetXMid

IsSpacingSet

GetMid

GetYDim

SetTitle

GetSize

GetYMid

GetSpacing

GetZDim

The following methods are publicly inherited from OEBase:

operator=

GetData

IsDataType

operator+=

GetDataIter

SetBaseData

AddBaseData

GetDataType

SetBoolData

AddData

GetDoubleData

SetData

Clear

GetFloatData

SetDoubleData

CreateCopy

GetIntData

SetFloatData

DeleteData

GetStringData

SetIntData

GetBoolData

HasData

SetStringData

Constructors

OEScalarGrid()

Creates a one point OEScalarGrid grid object.

OEScalarGrid(const OEScalarGrid &rhs)
OEScalarGrid(const OEFixedGrid<float> &rhs)

Creates a OEScalarGrid object and copies the entire contents of the ‘rhs’ grid.

OEScalarGrid(float minmax[6], float spacing, const char *title="")
OEScalarGrid(double minmax[6], double spacing, const char *title="")

Creates a OEScalarGrid object from a minimum bounding box (‘minmax’). The size of each length between grid points is determined by the ‘spacing’ parameter. The ‘title’ parameter is provided as a convenience for setting the title upon construction. It can later be retrieved with the OEGridBase.GetTitle method.

OEScalarGrid(int xdim, int ydim, int zdim, float midx, float midy, float midz,
             float spacing, std::string title="", float *dataptr=0)

Creates and initializes a OEScalarGrid object. The grid data can be copied from the optional parameter ‘dataptr’. The pointer should be an array of size xdim*ydim*zdim*sizeof(float).

operator=

OEScalarGrid &operator=(const OEScalarGrid &rhs)
OEScalarGrid &operator=(const OEFixedGrid<float> &rhs)

Copies the contents of ‘rhs’ grid.

Clear

void Clear()

Reallocates memory for the grid, effectively clearing all the grid values. Calls through to OEBase.Clear.

CreateCopy

OEBase *CreateCopy() const

Makes a copy of the grid instance.

GetDataType

const void *GetDataType() const

Returns the data type of the grid.

GetType

unsigned int GetType() const

Returns the data type tag for the grid.

IsDataType

bool IsDataType(const void *type) const

Returns whether type is the same as the instance this method is called on (i.e. OEScalarGrid).

SetType

bool SetType(unsigned int t)

Sets the tag associated with this grid.