rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
standardize_background_operation.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/operation/operation_declaration_macros.hpp>
6#include <rexlib/core/platform/dynamic_shared_object.h>
7#include <rexlib/em/em_component.hpp>
8#include <rexlib/ops/parameters/axis_list.hpp>
9#include <rexlib/ops/parameters/axis_selection.hpp>
10#include <rexlib/ops/rules/shape_rules.hpp>
11#include <rexlib/ops/rules/type_rules.hpp>
12
13namespace rexlib
14{
15namespace em
16{
17
18REXLIB_DECLARE_PARAMETRIC_OPERATION_TRAITS(
20 em_component,
21 REXLIB_OPERANDS("result"),
22 REXLIB_OPERANDS("value", "key"),
24 ops::axis_selection,
25 ops::keyed_unary_homogeneous_rule<floating_point_type_domain>
26);
27
65REXLIB_BEGIN_TEMPLATE_BASE
67 : public parametric_operation<
68 standardize_background_operation,
69 standardize_background_operation_traits
70 >
71{
72public:
90 double radius,
91 double lower_bound,
92 double upper_bound
93 );
94
101
107 double get_lower_bound() const noexcept;
108
114 double get_upper_bound() const noexcept;
115
116private:
117 double m_radius;
118 double m_lower_bound;
119 double m_upper_bound;
120};
122
123} // namespace em
124} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Standardize images against the statistics of their background.
Definition standardize_background_operation.hpp:71
double get_radius() const noexcept
Get the radius of the region excluded from the background.
standardize_background_operation(ops::axis_list axes, double radius, double lower_bound, double upper_bound)
Construct a standardization of the images along some axes.
CRTP base for operations whose signature depends on parameters.
Definition parametric_operation.hpp:43
operand_shape_rule< type_list<>, type_list< core_dimensions< axis_run<> > >, type_list< core_dimensions< axis_run<> >, core_dimensions<> >, named_core< axes_of > > keyed_axiswise_shape_rule
Operation along the axes the operation names that keeps their extents, reading a second input without...
Definition shape_rules.hpp:204
array standardize_background(const_array_ref value, const_array_ref key, span< const std::ptrdiff_t > axes, double radius, double lower_bound, double upper_bound, const execution_context &context, array *out=nullptr)
Standardize images against the statistics of their background.
std::vector< std::size_t > axis_list
The axes an operation acts along.
Definition axis_list.hpp:19
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10