mantidimaging.core.operations.sum_stack_intensities.sum_intensities module#
- class mantidimaging.core.operations.sum_stack_intensities.sum_intensities.SumIntensitiesFilter[source]#
Bases:
BaseFilterSum stack intensities as a new stack to emulate longer exposure times for Tomography and Time of Flight (ToF) datasets.
The stacks to be summed should have exactly the same shape (x,y) and number of slices (z). The z-axis could be either rotation angle or ToF bin. If angles differ acros stacks, a notification highlighting this will be raised
The new stack will be saved in-place.
- allow_for_180_projection = False#
- angle_variance_threshold = 0.1#
- static execute_wrapper(stack_to_sum_widget: DatasetSelectorWidgetView) partial[source]#
Should construct a partial call to _filter_func using values taken from the widgets passed to this function as kwargs. :param kwargs: widgets which contain values required for _filter_func. :return: a partial call to _filter_func using parameters taken from the input widgets.
- static filter_func(images: ImageStack, secondary_stack: ImageStack | None = None, progress: Any = None) ImageStack[source]#
Validate stacks and sum their intensities in-place.
- filter_name = 'Sum Stack Intensities'#
- static group_name() FilterGroup[source]#
- link_histograms = True#
- static register_gui(form: QFormLayout, on_change: Callable, view: Any) dict[str, Any][source]#
Adds any required input widgets to the given form and returns references to them.
The return values should be in a dict which can be unpacked as kwargs for a call to the operations execute_wrapper.
- Parameters:
view
form – the layout to create input widgets in
on_change – the filter view action to be bound to all created inputs
- Returns:
the widgets bound as kwargs which are needed to call execute_wrapper
- static sum_stacks(primary_stack: ImageStack, secondary_stack: ImageStack) None[source]#
Sum stacks element-wise.
Primary stack is modified in-place, secondary stack is left unchanged. Assumes stacks have already been validated for shape compatibility. During preview, primary_stack may be a single-slice subset; secondary is sliced to match.
- valid_types = ['Tomography', 'Time of Flight (ToF)']#