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() -> OEScalarGrid

Creates a one point OEScalarGrid grid object.

OEScalarGrid(rhs: OEScalarGrid) -> OEScalarGrid
OEScalarGrid(rhs: OEFixedFloatGrid) -> OEScalarGrid

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

OEScalarGrid(minmax: OEFloatArray, spacing: float, title: str = "") -> OEScalarGrid
OEScalarGrid(minmax: OEDoubleArray, spacing: float, title: str = "") -> OEScalarGrid

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(xdim: int, ydim: int, zdim: int, midx: float,
             midy: float, midz: float, spacing: float,
             title: str = "", dataptr: OEFloatArray = None) -> OEScalarGrid

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).

Clear

Clear() -> None

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

CreateCopy

CreateCopy() -> OEScalarGrid

Makes a copy of the grid instance.

GetDataType

GetDataType() -> void

Returns the data type of the grid.

GetType

GetType() -> int

Returns the data type tag for the grid.

IsDataType

IsDataType(type: void) -> bool

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

SetType

SetType(t: int) -> bool

Sets the tag associated with this grid.