magneticalc.SamplingVolume_Widget.SamplingVolume_Widget

# ``magneticalc`.`SamplingVolume_Widget`.`SamplingVolume_Widget``

class documentation

`class SamplingVolume_Widget(QGroupBox2):`

Constructor: `SamplingVolume_Widget(gui)`

View In Hierarchy

SamplingVolume_Widget class.

Method | `__init__` | Populates the widget.
Method | `clear_padding` | Clears the padding values.
Method | `open_constraint_editor` | Opens the constraint editor. Recalculates the sampling volume if the constraints changed.
Method | `override_padding` | Override padding, setting the bounding box directly.
Method | `readjust` | Readjusts the sampling volume to the currently set wire bounds and padding. This also readjusts the minimum padding bounds in case the wire bounds have shrunk too far.
Method | `reload` | Reloads the widget.
Method | `set_sampling_volume` | Sets the sampling volume. This will overwrite the currently set sampling volume in the model. Any underscored parameter may be left set to None in order to load its default value.
Method | `update` | Updates the widget.
Method | `update_controls` | Updates the controls.
Method | `update_labels` | Updates the labels.
Method | `update_padding` | Updates padding.
Class Variable | `PaddingMax` | Undocumented
Class Variable | `PaddingMin` | Undocumented
Class Variable | `ResolutionOptionsDict` | Undocumented
Class Variable | `UnitsLabelWidth` | Undocumented
Instance Variable | `constraint_editor` | Undocumented
Instance Variable | `gui` | Undocumented
Instance Variable | `padding_spinbox` | Undocumented
Instance Variable | `padding_widget` | Undocumented
Instance Variable | `resolution_combobox` | Undocumented
Instance Variable | `resolution_units_label` | Undocumented
Instance Variable | `total_constraints_label` | Undocumented
Instance Variable | `total_extent_label` | Undocumented
Instance Variable | `total_points_label` | Undocumented

Inherited from `QGroupBox2`:

Method | `set_color` | Sets the style and label color of the groupbox.

Inherited from `QLayouted` (via `QGroupBox2`):

Method | `addButtons` | Adds buttons.
Method | `addLayout` | Adds layout.
Method | `addSpacing` | Adds spacing.
Method | `addWidget` | Adds widget.
Method | `install_layout` | Installs this layout in the parent.
Instance Variable | `_layout` | Undocumented

def __init__(self, gui: `GUI`):
overrides `magneticalc.QtWidgets2.QGroupBox2.QGroupBox2.__init__`

Populates the widget.

Parameters
gui: `GUI` | GUI

def clear_padding(self):

Clears the padding values.

def open_constraint_editor(self):

Opens the constraint editor. Recalculates the sampling volume if the constraints changed.

def override_padding(self):

Override padding, setting the bounding box directly.

def readjust(self, _padding_: `list | None` = None, _override_padding_: `bool | None` = None, _bounding_box_: `tuple[np.ndarray, np.ndarray] | None` = None):

Readjusts the sampling volume to the currently set wire bounds and padding. This also readjusts the minimum padding bounds in case the wire bounds have shrunk too far.

Padding may also be overridden instead, setting the bounding box directly.

Any underscored parameter may be left set to None in order to load its default value.

Parameters
_padding_: `list | None` | Padding (3D point)
_override_padding_: `bool | None` | Enable to override padding instead, setting the bounding box directly
_bounding_box_: `tuple[np.ndarray, np.ndarray] | None` | Bounding box (used in conjunction with override_padding)

def reload(self):

Reloads the widget.

def set_sampling_volume(self, _resolution_exponent_: `int | None` = None, _label_resolution_exponent_: `int | None` = None, _padding_: `list | None` = None, _override_padding_: `bool | None` = None, _bounding_box_: `tuple[np.ndarray, np.ndarray] | None` = None, invalidate: `bool` = True, recalculate: `bool` = True):

Sets the sampling volume. This will overwrite the currently set sampling volume in the model. Any underscored parameter may be left set to None in order to load its default value.

Parameters
_resolution_exponent_: `int | None` | Sampling volume resolution exponent
_label_resolution_exponent_: `int | None` | Sampling volume label resolution exponent
_padding_: `list | None` | Padding (3D point)
_override_padding_: `bool | None` | Enable to override padding instead, setting the bounding box directly
_bounding_box_: `tuple[np.ndarray, np.ndarray] | None` | Bounding box (used in conjunction with override_padding)
invalidate: `bool` | Enable to invalidate this model hierarchy level
recalculate: `bool` | Enable to trigger final recalculation

def update(self):

Updates the widget.

def update_controls(self):

Updates the controls.

def update_labels(self):

Updates the labels.

def update_padding(self):

Updates padding.

PaddingMax: `int` =

Undocumented

PaddingMin: `int` =

Undocumented

ResolutionOptionsDict: `dict[str, int]` =

Undocumented

UnitsLabelWidth: `int` =

Undocumented

constraint_editor =

Undocumented

gui =

Undocumented

padding_spinbox: `list` =

Undocumented

padding_widget =

Undocumented

resolution_combobox =

Undocumented

resolution_units_label =

Undocumented

total_constraints_label =

Undocumented

total_extent_label =

Undocumented

total_points_label =

Undocumented