class documentation

class SamplingVolume(Validatable):

View In Hierarchy

Sampling volume class.
Method __init__ Initializes an empty sampling volume, with zero bounds and no constraints.
Method recalculate Recalculates the sampling volume points, permeabilities, labels and neighborhoods according to the constraints.
Method set Sets the parameters.
Method set_bounds_nearest Adjusts this volume's bounding box to fully enclose a 3D wire curve. This expands the bounding box to the next integer grid coordinates.
Method set_padding_nearest Shrinks or enlarges this volume's bounding box by some amount, in each direction, symmetrically. This shrinks or expands the bounding box to the next integer grid coordinates.
Instance Variable resolution Undocumented
Property bounds Returns this volume's bounding box.
Property dimension Sampling volume dimension if it is valid, None otherwise.
Property extent Returns this volume's extent.
Property labeled_indices Returns this sampling volume's labeled indices.
Property labels_count Returns this sampling volume's label count.
Property neighbor_indices Returns this sampling volume's neighborhood indices.
Property permeabilities Returns this sampling volume's relative permeabilities µ_r.
Property points Returns this sampling volume's points.
Property points_count Returns this sampling volume's point count.
Method _i_to_xyz Convert 1D index to 3D indices. Note: "Fortran" indexing (column-major order).
Method _xyz_to_i Convert 3D indices to 1D index. Note: "Fortran" indexing (column-major order).
Instance Variable _bounds_max Undocumented
Instance Variable _bounds_min Undocumented
Instance Variable _constraints Undocumented
Instance Variable _dimension Undocumented
Instance Variable _label_resolution Undocumented
Instance Variable _labeled_indices Undocumented
Instance Variable _neighbor_indices Undocumented
Instance Variable _permeabilities Undocumented
Instance Variable _points Undocumented

Inherited from Validatable:

Method valid.setter
Property valid True if valid, False if invalid
Instance Variable _valid Undocumented
def __init__(self):
Initializes an empty sampling volume, with zero bounds and no constraints.
@validator
def recalculate(self, progress_callback):
Recalculates the sampling volume points, permeabilities, labels and neighborhoods according to the constraints.
Parameters
progress_callback:CallableProgress callback
Returns
boolTrue if successful, False if interrupted
def set(self, resolution, label_resolution, constraints):
Sets the parameters.
Parameters
resolution:floatResolution
label_resolution:floatLabel resolution
constraints:List[Constraint]List of constraints
def set_bounds_nearest(self, bounds):

Adjusts this volume's bounding box to fully enclose a 3D wire curve. This expands the bounding box to the next integer grid coordinates.

Note: This will not automatically invalidate the sampling volume.

Parameters
bounds:np.ndarrayBounding box (minimum bounds, maximum bounds)
Returns
Rounded (_bounds_min, _bounds_max)
def set_padding_nearest(self, padding):

Shrinks or enlarges this volume's bounding box by some amount, in each direction, symmetrically. This shrinks or expands the bounding box to the next integer grid coordinates.

Note: This will not automatically invalidate the sampling volume.

Parameters
padding:np.ndarrayAmount of padding (3D point)
resolution =

Undocumented

@property
bounds: Tuple[np.ndarray, np.ndarray] =
Returns this volume's bounding box.
@property
@require_valid
dimension: Tuple[int, int, int] =
Sampling volume dimension if it is valid, None otherwise.
@property
extent: List =
Returns this volume's extent.
@property
@require_valid
labeled_indices: List =
Returns this sampling volume's labeled indices.
@property
@require_valid
labels_count: int =
Returns this sampling volume's label count.
@property
@require_valid
neighbor_indices: List[np.ndarray] =
Returns this sampling volume's neighborhood indices.
@property
@require_valid
permeabilities: np.ndarray =
Returns this sampling volume's relative permeabilities µ_r.
@property
@require_valid
points: np.array =
Returns this sampling volume's points.
@property
@require_valid
points_count: int =
Returns this sampling volume's point count.
def _i_to_xyz(self, _i):
Convert 1D index to 3D indices. Note: "Fortran" indexing (column-major order).
Parameters
_i:int1D index
Returns
List3D indices
def _xyz_to_i(self, xyz):
Convert 3D indices to 1D index. Note: "Fortran" indexing (column-major order).
Parameters
xyz:List3D indices
Returns
int1D index
_bounds_max =

Undocumented

_bounds_min =

Undocumented

_constraints =

Undocumented

_dimension =

Undocumented

_label_resolution =

Undocumented

_labeled_indices =

Undocumented

_neighbor_indices =

Undocumented

_permeabilities =

Undocumented

_points =

Undocumented