JWS C Library
C language utility library
3d.h File Reference

Declarations for matrix block filters. More...

#include <jwsc/config.h>
#include <stdlib.h>
#include <inttypes.h>
#include "jwsc/base/error.h"
#include "jwsc/matblock/matblock.h"
Include dependency graph for 3d.h:

Go to the source code of this file.

Functions

create_auto_3d_gaussian_filter

Creates a 3D Gaussian filter automatically sized.

Errorcreate_auto_3d_gaussian_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma)
 Creates a single precision 3D Gaussian filter automatically sized.
Errorcreate_auto_3d_gaussian_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma)
 Creates a double precision 3D Gaussian filter automatically sized.
create_3d_gaussian_filter

Creates a 3D Gaussian filter.

Errorcreate_3d_gaussian_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a single precision 3D Gaussian filter.
Errorcreate_3d_gaussian_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a double precision 3D Gaussian filter.
create_auto_3d_gaussian_dx_filter

Creates a 3D Gaussian filter with a partial derivative along columns automatically sized.

Errorcreate_auto_3d_gaussian_dx_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma)
 Creates a single precision 3D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.
Errorcreate_auto_3d_gaussian_dx_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma)
 Creates a double precision 3D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.
create_3d_gaussian_dx_filter

Creates a 3D Gaussian filter with a partial derivative along columns.

Errorcreate_3d_gaussian_dx_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a single precision 3D Gaussian filter with a partial derivative in the x-direction (column).
Errorcreate_3d_gaussian_dx_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a double precision 3D Gaussian filter with a partial derivative in the x-direction (column).
create_auto_3d_gaussian_dy_filter

Creates a 3D Gaussian filter with a partial derivative along rows automatically sized.

Errorcreate_auto_3d_gaussian_dy_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma)
 Creates a single precision 3D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.
Errorcreate_auto_3d_gaussian_dy_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma)
 Creates a double precision 3D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.
create_3d_gaussian_dy_filter

Creates a 3D Gaussian filter with a partial derivative along rows.

Errorcreate_3d_gaussian_dy_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a single precision 3D Gaussian filter with a partial derivative in the y direction (row).
Errorcreate_3d_gaussian_dy_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a double precision 3D Gaussian filter with a partial derivative in the y direction (row).
create_auto_3d_gaussian_dz_filter

Creates a 3D Gaussian filter with a partial derivative along matrices automatically sized.

Errorcreate_auto_3d_gaussian_dz_filter_f (Matblock_f **h_out, float mat_sigma, float row_sigma, float col_sigma)
 Creates a single precision 3D Gaussian filter with a partial derivative in the z-direction (matrix) automatically sized.
Errorcreate_auto_3d_gaussian_dz_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma)
 Creates a double precision 3D Gaussian filter with a partial derivative in the y-direction (matrix) automatically sized.
create_3d_gaussian_dz_filter

Creates a 3D Gaussian filter with a partial derivative along matrices.

Errorcreate_3d_gaussian_dz_filter_f (Matblock_f **h_out, double mat_sigma, double row_sigma, double col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a single precision 3D Gaussian filter with a partial derivative in the z direction (matrix).
Errorcreate_3d_gaussian_dz_filter_d (Matblock_d **h_out, double mat_sigma, double row_sigma, double col_sigma, uint32_t num_mats, uint32_t num_rows, uint32_t num_cols)
 Creates a double precision 3D Gaussian filter with a partial derivative in the z direction (matrix).

Detailed Description

Declarations for matrix block filters.

Author:
Joseph Schlecht
License:
Creative Commons BY-NC-SA 3.0

Definition in file 3d.h.


Function Documentation

Error* create_auto_3d_gaussian_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma 
)

Creates a single precision 3D Gaussian filter automatically sized.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Does not normalize the sum of the filter to 1.
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 89 of file 3d.c.

Error* create_auto_3d_gaussian_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma 
)

Creates a double precision 3D Gaussian filter automatically sized.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Does not normalize the sum of the filter to 1.
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 124 of file 3d.c.

Error* create_3d_gaussian_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a single precision 3D Gaussian filter.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Does not normalize the sum of the filter to 1.
If integrate_gaussian_pdf_d() function is not available, then the gaussian_pdf_d() is used for each value of the matrix block.
Dimensions must be > 0.

Definition at line 176 of file 3d.c.

Error* create_3d_gaussian_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a double precision 3D Gaussian filter.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Does not normalize the sum of the filter to 1.
If integrate_gaussian_pdf_d() function is not available, then the gaussian_pdf_d() is used for each value of the matrix block.
Dimensions must be > 0.

Definition at line 311 of file 3d.c.

Error* create_auto_3d_gaussian_dx_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.

The x direction is across matrix block columns.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 454 of file 3d.c.

Error* create_auto_3d_gaussian_dx_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the x-direction (column) automatically sized.

The x direction is across matrix block columns.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 490 of file 3d.c.

Error* create_3d_gaussian_dx_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the x-direction (column).

The x direction is across matrix block columns.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 539 of file 3d.c.

Error* create_3d_gaussian_dx_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the x-direction (column).

The x direction is across matrix block columns.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 618 of file 3d.c.

Error* create_auto_3d_gaussian_dy_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.

The y direction is across matrix block rows.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 708 of file 3d.c.

Error* create_auto_3d_gaussian_dy_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the y-direction (row) automatically sized.

The y direction is across matrix block rows.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 743 of file 3d.c.

Error* create_3d_gaussian_dy_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the y direction (row).

The y direction is across matrix block rows.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 792 of file 3d.c.

Error* create_3d_gaussian_dy_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the y direction (row).

The y direction is across matrix block rows.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 871 of file 3d.c.

Error* create_auto_3d_gaussian_dz_filter_f ( Matblock_f **  h_out,
float  mat_sigma,
float  row_sigma,
float  col_sigma 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the z-direction (matrix) automatically sized.

The y direction is across matrices.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 961 of file 3d.c.

Error* create_auto_3d_gaussian_dz_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the y-direction (matrix) automatically sized.

The z direction is across matrices.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
The dimensions of the filter will be square and odd and enough to contain at least 6 stdev of the Gaussian.

Definition at line 996 of file 3d.c.

Error* create_3d_gaussian_dz_filter_f ( Matblock_f **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a single precision 3D Gaussian filter with a partial derivative in the z direction (matrix).

The z direction is across matrices.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 1045 of file 3d.c.

Error* create_3d_gaussian_dz_filter_d ( Matblock_d **  h_out,
double  mat_sigma,
double  row_sigma,
double  col_sigma,
uint32_t  num_mats,
uint32_t  num_rows,
uint32_t  num_cols 
)

Creates a double precision 3D Gaussian filter with a partial derivative in the z direction (matrix).

The z direction is across matrices.

Parameters:
h_outResult parameter. If *h_out is NULL, a matrix block is allocated; otherwise its space is re-used.
mat_sigmaSigma to the Gaussian along matrices.
row_sigmaSigma to the Gaussian along rows.
col_sigmaSigma to the Gaussian along columns.
num_matsNumber of matrices.
num_rowsNumber of rows.
num_colsNumber of columns.
Returns:
On success, NULL is returned. On error, an Error is returned and *h_out is freed and set to NULL.
Note:
Dimensions must be > 0.

Definition at line 1124 of file 3d.c.