|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A kernel that is pre-calculated for the entire image, useful for repeated applications.
Use this for spatially variable kernels. It is not needed for, e.g., the symmetric Gaussian.
| kernelT | is the kernel type. See above for the requirements on kernelT. |
Definition at line 390 of file imageFilters.hpp.
#include <improc/imageFilters.hpp>
Public Member Functions | |
| precalcKernel ()=delete | |
| Disallow construction without a production kernel and image geometry. | |
| precalcKernel (const kernelT &kernel, uint32_t rows, uint32_t cols, arithT xcen, arithT ycen) | |
| Pre-calculate a production kernel for every coordinate in an image. | |
| int | maxWidth () const |
| Get the maximum half-width reported by the cached production kernel. | |
| error_t | setKernel (arithT x, arithT y, arrayT &kernel) const |
| Retrieve the cached kernel at an integral image-relative coordinate. | |
Public Attributes | |
| kernelT | m_kernel |
| copied production kernel used to populate the cache. | |
| uint32_t | m_rows |
| number of image rows represented by the cache. | |
| uint32_t | m_cols |
| number of image columns represented by the cache. | |
| arithT | m_xcen |
| pixel x-coordinate of the image center. | |
| arithT | m_ycen |
| pixel y-coordinate of the image center. | |
| int | m_maxWidth |
| maximum half-width reported by the copied production kernel. | |
| std::vector< arrayT > | m_kernels |
| generated kernels in column-major image-coordinate order. | |
|
delete |
Disallow construction without a production kernel and image geometry.
|
inline |
Pre-calculate a production kernel for every coordinate in an image.
| mx::exception | when the production kernel cannot generate any cache entry. |
| [in] | kernel | A fully initialized kernel. Is copied. |
| [in] | rows | The rows in the images to be filtered |
| [in] | cols | The columns in the images to be filtered |
| [in] | xcen | The pixel x-coordinate of the center of the image |
| [in] | ycen | The pixel y-coordinate of the center of the image |
Definition at line 412 of file imageFilters.hpp.
References mx::exception, m_cols, m_kernel, m_kernels, m_maxWidth, m_rows, m_xcen, m_ycen, and mx::noerror.
|
inline |
Get the maximum half-width reported by the cached production kernel.
Definition at line 441 of file imageFilters.hpp.
References m_maxWidth.
|
inline |
Retrieve the cached kernel at an integral image-relative coordinate.
| [in] | x | x-coordinate relative to image center |
| [in] | y | x-coordinate relative to image center |
| [in] | kernel | the array to populate with the kernel, resized |
Definition at line 447 of file imageFilters.hpp.
References mx::invalidarg, mx::invalidconfig, mx::math::isFinite(), m_cols, m_kernels, m_rows, m_xcen, m_ycen, and mx::noerror.
Referenced by unitTest::improcTest::imageFiltersTest::TEST_CASE(), unitTest::improcTest::imageFiltersTest::TEST_CASE(), and unitTest::improcTest::imageFiltersTest::TEST_CASE().
| uint32_t mx::improc::precalcKernel< kernelT >::m_cols |
number of image columns represented by the cache.
Definition at line 399 of file imageFilters.hpp.
Referenced by precalcKernel(), and setKernel().
| kernelT mx::improc::precalcKernel< kernelT >::m_kernel |
copied production kernel used to populate the cache.
Definition at line 396 of file imageFilters.hpp.
Referenced by precalcKernel().
| std::vector<arrayT> mx::improc::precalcKernel< kernelT >::m_kernels |
generated kernels in column-major image-coordinate order.
Definition at line 405 of file imageFilters.hpp.
Referenced by precalcKernel(), setKernel(), unitTest::improcTest::imageFiltersTest::TEST_CASE(), and unitTest::improcTest::imageFiltersTest::TEST_CASE().
| int mx::improc::precalcKernel< kernelT >::m_maxWidth |
maximum half-width reported by the copied production kernel.
Definition at line 403 of file imageFilters.hpp.
Referenced by precalcKernel(), and maxWidth().
| uint32_t mx::improc::precalcKernel< kernelT >::m_rows |
number of image rows represented by the cache.
Definition at line 398 of file imageFilters.hpp.
Referenced by precalcKernel(), and setKernel().
| arithT mx::improc::precalcKernel< kernelT >::m_xcen |
pixel x-coordinate of the image center.
Definition at line 400 of file imageFilters.hpp.
Referenced by precalcKernel(), and setKernel().
| arithT mx::improc::precalcKernel< kernelT >::m_ycen |
pixel y-coordinate of the image center.
Definition at line 401 of file imageFilters.hpp.
Referenced by precalcKernel(), and setKernel().