#include <vimt_image_2d_of.h>
Inheritance diagram for vimt_image_2d_of< T >:

Each plane is ni() x nj() Ts, with the (x,y) element of the i'th plane accessible using im.plane(i)[x*im.istep() + y*im.jstep()]
Definition at line 17 of file vimt_image_2d_of.h.
Public Member Functions | |
| vimt_image_2d_of () | |
| Default constructor. | |
| vimt_image_2d_of (unsigned ni, unsigned nj, unsigned np=1, const vimt_transform_2d &w2i=vimt_transform_2d()) | |
| Construct an image of size (ni, nj, np) with optional world_to_image transform. | |
| vimt_image_2d_of (const vil_image_view< T > &view, const vimt_transform_2d &w2i=vimt_transform_2d()) | |
| Construct from a view and optional world-to-image transform (takes copies of both). | |
| virtual | ~vimt_image_2d_of () |
| Destructor. | |
| virtual const vil_image_view_base & | image_base () const |
| Baseclass view of image. | |
| vil_image_view< T > & | image () |
| Image view. | |
| const vil_image_view< T > & | image () const |
| Image view. | |
| bool | operator== (const vimt_image_2d_of< T > &) const |
| True if transforms are equal, and they share same image data. | |
| void | set_valid_region (int x0, unsigned nx, int y0, unsigned ny) |
| Define valid data region (including transform). | |
| unsigned | n_planes () const |
| Get the number of planes in the image. | |
| void | deep_copy (const vimt_image_2d_of &image) |
| Take a deep copy of image (copy data, not just pointers). | |
| short | version_no () const |
| Version number for I/O. | |
| virtual vcl_string | is_a () const |
| Name of the class. | |
| virtual bool | is_class (vcl_string const &s) const |
| Does the name of the class match the argument?. | |
| virtual vimt_image * | clone () const |
| Create a copy on the heap and return base class pointer. | |
| virtual vimt_image * | deep_clone () const |
| Create a deep copy on the heap and return base class pointer. | |
| virtual void | print_summary (vcl_ostream &os) const |
| Print class to os. | |
| virtual void | print_all (vcl_ostream &os) const |
| print all data to os (rounds output to int). | |
| virtual void | b_write (vsl_b_ostream &bfs) const |
| Save class to binary file stream. | |
| virtual void | b_read (vsl_b_istream &bfs) |
| Load class from binary file stream. | |
| virtual unsigned | n_dims () const |
| Return dimensionality of image. | |
| virtual vcl_vector< unsigned > | image_size () const |
| Return vector indicating size of image in pixels. | |
| virtual void | world_bounds (vcl_vector< double > &b_lo, vcl_vector< double > &b_hi) const |
| Return vectors defining bounding box containing image in world co-ords. | |
| const vimt_transform_2d & | world2im () const |
| Current world-to-image transformation. | |
| vimt_transform_2d & | world2im () |
| Current world-to-image transformation. | |
| void | set_world2im (const vimt_transform_2d &w2i) |
| Set world-to-image transformation. | |
| bool | operator== (const vimt_image &) const |
| Shallow equality. | |
Protected Attributes | |
| vimt_transform_2d | world2im_ |
Private Member Functions | |
| bool | equals (const vimt_image &) const |
| Shallow equality tester. | |
Private Attributes | |
| vil_image_view< T > | image_ |
Related Functions | |
| (Note that these are not member functions.) | |
| void | vimt_normalised_correlation_2d (const vimt_image_2d_of< srcT > &src_im, vimt_image_2d_of< destT > &dest_im, const vil_image_view< kernelT > &kernel, vgl_point_2d< double > kernel_ref_pt, accumT ac) |
| Evaluate dot product between kernel and (normalised) src_im. | |
| void | vimt_sample_grid_bicub (vnl_vector< vecType > &vec, const vimt_image_2d_of< imType > &image, const vgl_point_2d< double > &p, const vgl_vector_2d< double > &u, const vgl_vector_2d< double > &v, int n1, int n2) |
| Sample grid from image, using bicubic interpolation. | |
| void | vimt_sample_grid_bilin (vnl_vector< vecType > &vec, const vimt_image_2d_of< imType > &image, const vgl_point_2d< double > &p, const vgl_vector_2d< double > &u, const vgl_vector_2d< double > &v, int n1, int n2) |
| Sample grid from image, using bilinear interpolation. | |
| vimt_image_2d_of< T >::vimt_image_2d_of | ( | ) | [inline] |
Default constructor.
Creates an empty one-plane image.
Definition at line 29 of file vimt_image_2d_of.h.
| vimt_image_2d_of< T >::vimt_image_2d_of | ( | unsigned | ni, | |
| unsigned | nj, | |||
| unsigned | np = 1, |
|||
| const vimt_transform_2d & | w2i = vimt_transform_2d() | |||
| ) | [inline] |
Construct an image of size (ni, nj, np) with optional world_to_image transform.
Definition at line 33 of file vimt_image_2d_of.h.
| vimt_image_2d_of< T >::vimt_image_2d_of | ( | const vil_image_view< T > & | view, | |
| const vimt_transform_2d & | w2i = vimt_transform_2d() | |||
| ) | [inline, explicit] |
Construct from a view and optional world-to-image transform (takes copies of both).
Definition at line 39 of file vimt_image_2d_of.h.
| virtual vimt_image_2d_of< T >::~vimt_image_2d_of | ( | ) | [inline, virtual] |
| bool vimt_image_2d_of< T >::equals | ( | const vimt_image & | ) | const [private, virtual] |
Shallow equality tester.
The parameter must be identical type to this.
Implements vimt_image.
Definition at line 29 of file vimt_image_2d_of.txx.
| virtual const vil_image_view_base& vimt_image_2d_of< T >::image_base | ( | ) | const [inline, virtual] |
Baseclass view of image.
Implements vimt_image_2d.
Definition at line 48 of file vimt_image_2d_of.h.
| vil_image_view<T>& vimt_image_2d_of< T >::image | ( | ) | [inline] |
| const vil_image_view<T>& vimt_image_2d_of< T >::image | ( | ) | const [inline] |
| bool vimt_image_2d_of< T >::operator== | ( | const vimt_image_2d_of< T > & | ) | const |
True if transforms are equal, and they share same image data.
This does not do a deep equality on image data. If the images point to different image data objects that contain identical images, then the result will still be false.
Definition at line 126 of file vimt_image_2d_of.txx.
| void vimt_image_2d_of< T >::set_valid_region | ( | int | x0, | |
| unsigned | nx, | |||
| int | y0, | |||
| unsigned | ny | |||
| ) |
Define valid data region (including transform).
Resizes and sets the transformation so that world2im(x,y) is valid for all points in range Specifically, set_valid_region(x0,nx,y0,ny); world2im() translates by (-x0,-y0)
Definition at line 39 of file vimt_image_2d_of.txx.
| unsigned vimt_image_2d_of< T >::n_planes | ( | ) | const [inline, virtual] |
Get the number of planes in the image.
Implements vimt_image.
Definition at line 70 of file vimt_image_2d_of.h.
| void vimt_image_2d_of< T >::deep_copy | ( | const vimt_image_2d_of< T > & | image | ) |
Take a deep copy of image (copy data, not just pointers).
Definition at line 20 of file vimt_image_2d_of.txx.
| short vimt_image_2d_of< T >::version_no | ( | ) | const |
Version number for I/O.
Reimplemented from vimt_image.
Definition at line 54 of file vimt_image_2d_of.txx.
| virtual vcl_string vimt_image_2d_of< T >::is_a | ( | ) | const [virtual] |
| bool vimt_image_2d_of< T >::is_class | ( | vcl_string const & | s | ) | const [virtual] |
Does the name of the class match the argument?.
Reimplemented from vimt_image_2d.
Definition at line 46 of file vimt_image_2d_of.txx.
| virtual vimt_image* vimt_image_2d_of< T >::clone | ( | ) | const [inline, virtual] |
Create a copy on the heap and return base class pointer.
Note that this will make a shallow copy of any contained images
Implements vimt_image.
Definition at line 86 of file vimt_image_2d_of.h.
| vimt_image * vimt_image_2d_of< T >::deep_clone | ( | ) | const [virtual] |
Create a deep copy on the heap and return base class pointer.
This will make a deep copy of any contained images
Implements vimt_image.
Definition at line 61 of file vimt_image_2d_of.txx.
| void vimt_image_2d_of< T >::print_summary | ( | vcl_ostream & | os | ) | const [virtual] |
| void vimt_image_2d_of< T >::print_all | ( | vcl_ostream & | os | ) | const [virtual] |
print all data to os (rounds output to int).
Implements vimt_image.
Definition at line 80 of file vimt_image_2d_of.txx.
| void vimt_image_2d_of< T >::b_write | ( | vsl_b_ostream & | bfs | ) | const [virtual] |
Save class to binary file stream.
Implements vimt_image.
Definition at line 91 of file vimt_image_2d_of.txx.
| void vimt_image_2d_of< T >::b_read | ( | vsl_b_istream & | bfs | ) | [virtual] |
Load class from binary file stream.
Implements vimt_image.
Definition at line 101 of file vimt_image_2d_of.txx.
| virtual unsigned vimt_image_2d::n_dims | ( | ) | const [inline, virtual, inherited] |
Return dimensionality of image.
Implements vimt_image.
Definition at line 31 of file vimt_image_2d.h.
| vcl_vector< unsigned > vimt_image_2d::image_size | ( | ) | const [virtual, inherited] |
Return vector indicating size of image in pixels.
2D image is v[0] x v[1] Somewhat inefficient: Only use when you absolutely have to. Usually one only needs to know the size once one knows the exact type.
Implements vimt_image.
Definition at line 12 of file vimt_image_2d.cxx.
| void vimt_image_2d::world_bounds | ( | vcl_vector< double > & | b_lo, | |
| vcl_vector< double > & | b_hi | |||
| ) | const [virtual, inherited] |
Return vectors defining bounding box containing image in world co-ords.
Implements vimt_image.
Definition at line 21 of file vimt_image_2d.cxx.
| const vimt_transform_2d& vimt_image_2d::world2im | ( | ) | const [inline, inherited] |
| vimt_transform_2d& vimt_image_2d::world2im | ( | ) | [inline, inherited] |
| void vimt_image_2d::set_world2im | ( | const vimt_transform_2d & | w2i | ) | [inline, inherited] |
Set world-to-image transformation.
Definition at line 51 of file vimt_image_2d.h.
| bool vimt_image::operator== | ( | const vimt_image & | ) | const [inherited] |
Shallow equality.
tests if the two images are the same type, have equal transforms, and point to the same image data with equal step sizes, etc.
Definition at line 27 of file vimt_image.cxx.
| void vimt_normalised_correlation_2d | ( | const vimt_image_2d_of< srcT > & | src_im, | |
| vimt_image_2d_of< destT > & | dest_im, | |||
| const vil_image_view< kernelT > & | kernel, | |||
| vgl_point_2d< double > | kernel_ref_pt, | |||
| accumT | ac | |||
| ) | [related] |
Evaluate dot product between kernel and (normalised) src_im.
Assumes that the kernel has been normalised to have zero mean and unit variance.
Definition at line 18 of file vimt_normalised_correlation_2d.h.
| void vimt_sample_grid_bicub | ( | vnl_vector< vecType > & | vec, | |
| const vimt_image_2d_of< imType > & | image, | |||
| const vgl_point_2d< double > & | p0, | |||
| const vgl_vector_2d< double > & | u, | |||
| const vgl_vector_2d< double > & | v, | |||
| int | n1, | |||
| int | n2 | |||
| ) | [related] |
Sample grid from image, using bicubic interpolation.
Grid points are p+i.u+j.v where i=[0..n1-1], j=[0..n2-1] Vector vec is resized to n1*n2*np elements, where np=image.nplanes(). vec[0]..vec[np-1] are the values from point p0 Samples are taken along direction v first, then along u. Points outside image return zero.
Definition at line 34 of file vimt_sample_grid_bicub.txx.
| void vimt_sample_grid_bilin | ( | vnl_vector< vecType > & | vec, | |
| const vimt_image_2d_of< imType > & | image, | |||
| const vgl_point_2d< double > & | p0, | |||
| const vgl_vector_2d< double > & | u, | |||
| const vgl_vector_2d< double > & | v, | |||
| int | n1, | |||
| int | n2 | |||
| ) | [related] |
Sample grid from image, using bilinear interpolation.
Grid points are p+i.u+j.v where i=[0..n1-1], j=[0..n2-1] Vector vec is resized to n1*n2*np elements, where np=image.nplanes(). vec[0]..vec[np-1] are the values from point p0 Samples are taken along direction v first, then along u. Points outside image return zero.
Definition at line 34 of file vimt_sample_grid_bilin.txx.
vil_image_view<T> vimt_image_2d_of< T >::image_ [private] |
Definition at line 19 of file vimt_image_2d_of.h.
vimt_transform_2d vimt_image_2d::world2im_ [protected, inherited] |
Definition at line 19 of file vimt_image_2d.h.
1.5.1