mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ndarray_filter.h
Go to the documentation of this file.
1 #ifndef MF_NDARRAY_FILTER_H_
2 #define MF_NDARRAY_FILTER_H_
3 
4 #include "ndarray_view.h"
5 
6 namespace mf {
7 
9 template<std::size_t Dim, typename Elem, typename Kernel_elem>
15 };
16 
17 
19 
20 template<std::size_t Dim, typename Elem, typename Kernel_elem>
22  const ndarray_view<Dim, Elem>& view,
23  const ndarray_view<Dim, Kernel_elem> kernel,
24  const ndptrdiff<Dim>& pos
25 );
26 
27 
29 
33 template<std::size_t Dim, typename In_elem, typename Out_elem, typename Kernel_elem, typename Function>
34 void apply_kernel(
35  Function&& func,
36  const ndarray_view<Dim, In_elem>& in_view,
37  const ndarray_view<Dim, Out_elem>& out_view,
39 );
40 
41 
42 }
43 
44 #include "ndarray_filter.tcc"
45 
46 #endif
Placement of a kernel on an ndarray_view.
Definition: ndarray_filter.h:10
ndarray_view< Dim, Elem > view_section
Section of the view covered by kernel.
Definition: ndarray_filter.h:11
void apply_kernel(Function &&func, const ndarray_view< Dim, In_elem > &in_view, const ndarray_view< Dim, Out_elem > &out_view, const ndarray_view< Dim, Kernel_elem > kernel)
Place kernel over all elements in in_view, and call func to modify corresponding out_view element...
Definition: ndarray_filter.tcc:39
ndarray_view< Dim, Kernel_elem > kernel_section
Section of the kernel which covers view (may be truncated).
Definition: ndarray_filter.h:12
Vector of n-dimensional coordinates.
Definition: ndcoord.h:18
ndptrdiff< Dim > absolute_position
Coordinates of kernel center in full view.
Definition: ndarray_filter.h:14
ndptrdiff< Dim > section_position
Coordinates of kernel center in view_section and kernel_section.
Definition: ndarray_filter.h:13
kernel_placement< Dim, Elem, Kernel_elem > place_kernel_at(const ndarray_view< Dim, Elem > &view, const ndarray_view< Dim, Kernel_elem > kernel, const ndptrdiff< Dim > &pos)
Return kernel_placement object for placement of kernel kernel over view centered at pos...
Definition: ndarray_filter.tcc:7