#include <vil3d_structuring_element.h>
Elements in box bounded by [min_i(),max_i()][min_j(),max_j()] Non-zero pixels are given by (p_i[k],p_j[k])
Definition at line 15 of file vil3d_structuring_element.h.
Public Member Functions | |
| vil3d_structuring_element () | |
| vil3d_structuring_element (const vcl_vector< int > &p_i, const vcl_vector< int > &p_j, const vcl_vector< int > &p_k) | |
| Define elements { (p_i[a],p_j[a],p_k[a]) }. | |
| void | set (const vcl_vector< int > &p_i, const vcl_vector< int > &p_j, const vcl_vector< int > &p_k) |
| Define elements { (p_i[a],p_j[a],p_k[a]) }. | |
| void | set_to_sphere (double r) |
| Set to sphere of radius r. | |
| void | set_to_sphere_noniso (double r, double sx, double sy, double sz) |
| Set to sphere of radius r, but with non isotropic voxel sizes. | |
| void | set_to_line_i (int ilo, int ihi) |
| Set to line along i (ilo,0). | |
| void | set_to_line_j (int jlo, int jhi) |
| Set to line along j (jlo,0). | |
| void | set_to_line_k (int klo, int khi) |
| Set to line along k (klo,0). | |
| const vcl_vector< int > & | p_i () const |
| i position of elements (i,j,k). | |
| const vcl_vector< int > & | p_j () const |
| j position of elements (i,j,k). | |
| const vcl_vector< int > & | p_k () const |
| k position of elements (i,j,k). | |
| int | min_i () const |
| i range of elements is [min_i(),max_i()]. | |
| int | max_i () const |
| i range of elements is [min_i_,max_i()]. | |
| int | min_j () const |
| j range of elements is [min_j_,max_j()]. | |
| int | max_j () const |
| j range of elements is [min_j_,max_j()]. | |
| int | min_k () const |
| k range of elements is [min_k(),max_k()]. | |
| int | max_k () const |
| k range of elements is [min_k(),max_k()]. | |
Private Attributes | |
| vcl_vector< int > | p_i_ |
| i position of elements (i,j,k). | |
| vcl_vector< int > | p_j_ |
| j position of elements (i,j,k). | |
| vcl_vector< int > | p_k_ |
| k position of elements (i,j,k). | |
| int | min_i_ |
| i range of elements is [min_i_,max_i_]. | |
| int | max_i_ |
| i range of elements is [min_i_,max_i_]. | |
| int | min_j_ |
| j range of elements is [min_j_,max_j_]. | |
| int | max_j_ |
| j range of elements is [min_j_,max_j_]. | |
| int | min_k_ |
| k range of elements is [min_k_,max_k_]. | |
| int | max_k_ |
| k range of elements is [min_k_,max_k_]. | |
Related Functions | |
| (Note that these are not member functions.) | |
| void | vil3d_binary_closing (const vil3d_image_view< bool > &src_image, vil3d_image_view< bool > &dest_image, const vil3d_structuring_element &element) |
| Applies morphological closing operation with given structuring element. | |
| void | vil3d_binary_dilate (const vil3d_image_view< bool > &src_image, vil3d_image_view< bool > &dest_image, const vil3d_structuring_element &element) |
| Dilates src_image to produce dest_image (assumed single plane). | |
| void | vil3d_binary_erode (const vil3d_image_view< bool > &src_image, vil3d_image_view< bool > &dest_image, const vil3d_structuring_element &element) |
| Erodes src_image to produce dest_image (assumed single plane). | |
| void | vil3d_binary_opening (const vil3d_image_view< bool > &src_image, vil3d_image_view< bool > &dest_image, const vil3d_structuring_element &element) |
| Applies morphological opening operation with given structuring element. | |
| template<class T> | |
| void | vil3d_max_product_filter (vil3d_image_view< T > &image, const vil3d_structuring_element &se, const vcl_vector< double > &f) |
| Preforms raster scan through image, comparing each voxel with nbours. | |
| vil3d_structuring_element::vil3d_structuring_element | ( | ) | [inline] |
Definition at line 37 of file vil3d_structuring_element.h.
| vil3d_structuring_element::vil3d_structuring_element | ( | const vcl_vector< int > & | p_i, | |
| const vcl_vector< int > & | p_j, | |||
| const vcl_vector< int > & | p_k | |||
| ) |
Define elements { (p_i[a],p_j[a],p_k[a]) }.
Definition at line 12 of file vil3d_structuring_element.cxx.
| void vil3d_structuring_element::set | ( | const vcl_vector< int > & | p_i, | |
| const vcl_vector< int > & | p_j, | |||
| const vcl_vector< int > & | p_k | |||
| ) |
Define elements { (p_i[a],p_j[a],p_k[a]) }.
Definition at line 20 of file vil3d_structuring_element.cxx.
| void vil3d_structuring_element::set_to_sphere | ( | double | r | ) |
Set to sphere of radius r.
Select pixels in disk s.t. x*x+y*y+z*z<=r^r
Definition at line 49 of file vil3d_structuring_element.cxx.
| void vil3d_structuring_element::set_to_sphere_noniso | ( | double | r, | |
| double | sx, | |||
| double | sy, | |||
| double | sz | |||
| ) |
Set to sphere of radius r, but with non isotropic voxel sizes.
Select pixels in disk s.t. x*x+y*y+z*z<=r^r
Definition at line 65 of file vil3d_structuring_element.cxx.
| void vil3d_structuring_element::set_to_line_i | ( | int | ilo, | |
| int | ihi | |||
| ) |
| void vil3d_structuring_element::set_to_line_j | ( | int | jlo, | |
| int | jhi | |||
| ) |
| void vil3d_structuring_element::set_to_line_k | ( | int | klo, | |
| int | khi | |||
| ) |
Set to line along k (klo,0).
.(khi,0).
Definition at line 114 of file vil3d_structuring_element.cxx.
| const vcl_vector<int>& vil3d_structuring_element::p_i | ( | ) | const [inline] |
| const vcl_vector<int>& vil3d_structuring_element::p_j | ( | ) | const [inline] |
| const vcl_vector<int>& vil3d_structuring_element::p_k | ( | ) | const [inline] |
| int vil3d_structuring_element::min_i | ( | ) | const [inline] |
i range of elements is [min_i(),max_i()].
Definition at line 75 of file vil3d_structuring_element.h.
| int vil3d_structuring_element::max_i | ( | ) | const [inline] |
| int vil3d_structuring_element::min_j | ( | ) | const [inline] |
| int vil3d_structuring_element::max_j | ( | ) | const [inline] |
| int vil3d_structuring_element::min_k | ( | ) | const [inline] |
k range of elements is [min_k(),max_k()].
Definition at line 83 of file vil3d_structuring_element.h.
| int vil3d_structuring_element::max_k | ( | ) | const [inline] |
k range of elements is [min_k(),max_k()].
Definition at line 85 of file vil3d_structuring_element.h.
| void vil3d_binary_closing | ( | const vil3d_image_view< bool > & | src_image, | |
| vil3d_image_view< bool > & | dest_image, | |||
| const vil3d_structuring_element & | element | |||
| ) | [related] |
Applies morphological closing operation with given structuring element.
Applies dilation followed by erosion
Definition at line 15 of file vil3d_binary_closing.h.
| void vil3d_binary_dilate | ( | const vil3d_image_view< bool > & | src_image, | |
| vil3d_image_view< bool > & | dest_image, | |||
| const vil3d_structuring_element & | element | |||
| ) | [related] |
Dilates src_image to produce dest_image (assumed single plane).
Definition at line 10 of file vil3d_binary_dilate.cxx.
| void vil3d_binary_erode | ( | const vil3d_image_view< bool > & | src_image, | |
| vil3d_image_view< bool > & | dest_image, | |||
| const vil3d_structuring_element & | element | |||
| ) | [related] |
Erodes src_image to produce dest_image (assumed single plane).
Definition at line 11 of file vil3d_binary_erode.cxx.
| void vil3d_binary_opening | ( | const vil3d_image_view< bool > & | src_image, | |
| vil3d_image_view< bool > & | dest_image, | |||
| const vil3d_structuring_element & | element | |||
| ) | [related] |
Applies morphological opening operation with given structuring element.
Applies erosion followed by dilation
Definition at line 15 of file vil3d_binary_opening.h.
| void vil3d_max_product_filter | ( | vil3d_image_view< T > & | image, | |
| const vil3d_structuring_element & | se, | |||
| const vcl_vector< double > & | f | |||
| ) | [related] |
Preforms raster scan through image, comparing each voxel with nbours.
Runs through every voxel in raster order. Each voxel is compared with weighted versions of offset voxels, and is replaced with the maximum value.
Replace each voxel with max(im(i,j,k),max_a (f[a]*im(i+p_i[a],j+p_j[a],k+p_k[a],plane))
If a suitable combination of se and f is chosen, this performs half an 'exponential distance transform'. For an example of use, see vil3d_exp_distance_transform.
Definition at line 71 of file vil3d_max_product_filter.h.
vcl_vector<int> vil3d_structuring_element::p_i_ [private] |
vcl_vector<int> vil3d_structuring_element::p_j_ [private] |
vcl_vector<int> vil3d_structuring_element::p_k_ [private] |
int vil3d_structuring_element::min_i_ [private] |
int vil3d_structuring_element::max_i_ [private] |
int vil3d_structuring_element::min_j_ [private] |
int vil3d_structuring_element::max_j_ [private] |
int vil3d_structuring_element::min_k_ [private] |
int vil3d_structuring_element::max_k_ [private] |
1.5.1