Public Member Functions | Protected Member Functions | Protected Attributes
vimt_image_2d Class Reference

A base class for arbitrary 2D images. More...

#include <vimt_image_2d.h>

Inheritance diagram for vimt_image_2d:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vimt_image_2d ()
 Dflt ctor.
virtual ~vimt_image_2d ()
 Destructor.
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 vcl_vector< double > pixel_size () const
 Return 2 element vector indicating the size of a pixel.
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_2dworld2im () const
 Current world-to-image transformation.
vimt_transform_2dworld2im ()
 Current world-to-image transformation.
void set_world2im (const vimt_transform_2d &w2i)
 Set world-to-image transformation.
virtual const vil_image_view_baseimage_base () const =0
 Baseclass view of image.
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 unsigned n_planes () const =0
 Return number of planes in images.
short version_no () const
 Version number for I/O.
virtual vimt_imageclone () const =0
 Create a copy on the heap and return base class pointer.
virtual vimt_imagedeep_clone () const =0
 Create a deep copy on the heap and return base class pointer.
bool operator== (const vimt_image &) const
 Shallow equality.
virtual void print_summary (vcl_ostream &os) const =0
 Print class to os.
virtual void print_all (vcl_ostream &os) const =0
 Print whole image to os.
virtual void b_write (vsl_b_ostream &bfs) const =0
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)=0
 Load class from binary file stream.

Protected Member Functions

 vimt_image_2d (const vimt_transform_2d &w2i)

Protected Attributes

vimt_transform_2d world2im_

Detailed Description

A base class for arbitrary 2D images.

world2im() gives transformation from world to image co-ordinates

Definition at line 15 of file vimt_image_2d.h.


Constructor & Destructor Documentation

vimt_image_2d::vimt_image_2d ( const vimt_transform_2d w2i) [inline, protected]

Definition at line 20 of file vimt_image_2d.h.

vimt_image_2d::vimt_image_2d ( ) [inline]

Dflt ctor.

Definition at line 24 of file vimt_image_2d.h.

virtual vimt_image_2d::~vimt_image_2d ( ) [inline, virtual]

Destructor.

Definition at line 27 of file vimt_image_2d.h.


Member Function Documentation

virtual void vimt_image::b_read ( vsl_b_istream bfs) [pure virtual, inherited]

Load class from binary file stream.

Implemented in vimt_image_2d_of< T >.

virtual void vimt_image::b_write ( vsl_b_ostream bfs) const [pure virtual, inherited]

Save class to binary file stream.

Implemented in vimt_image_2d_of< T >.

virtual vimt_image* vimt_image::clone ( ) const [pure virtual, inherited]

Create a copy on the heap and return base class pointer.

Note that this will make a shallow copy of any contained images

Implemented in vimt_image_2d_of< T >.

virtual vimt_image* vimt_image::deep_clone ( ) const [pure virtual, inherited]

Create a deep copy on the heap and return base class pointer.

This will make a deep copy of any contained images

Implemented in vimt_image_2d_of< T >.

virtual const vil_image_view_base& vimt_image_2d::image_base ( ) const [pure virtual]

Baseclass view of image.

Implemented in vimt_image_2d_of< T >.

vcl_vector< unsigned > vimt_image_2d::image_size ( ) const [virtual]

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.

2D image is v[0] x v[1], 3D image is v[0] x v[1] x v[2] Somewhat inefficient: Only use when you have to

Implements vimt_image.

Definition at line 13 of file vimt_image_2d.cxx.

virtual vcl_string vimt_image_2d::is_a ( ) const [inline, virtual]

Name of the class.

Implements vimt_image.

Reimplemented in vimt_image_2d_of< T >.

Definition at line 63 of file vimt_image_2d.h.

virtual bool vimt_image_2d::is_class ( vcl_string const &  s) const [inline, virtual]

Does the name of the class match the argument?.

Implements vimt_image.

Reimplemented in vimt_image_2d_of< T >.

Definition at line 66 of file vimt_image_2d.h.

virtual unsigned vimt_image_2d::n_dims ( ) const [inline, virtual]

Return dimensionality of image.

Implements vimt_image.

Definition at line 30 of file vimt_image_2d.h.

virtual unsigned vimt_image::n_planes ( ) const [pure virtual, inherited]

Return number of planes in images.

Implemented in vimt_image_2d_of< T >.

bool vimt_image::operator== ( const vimt_image im) 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.

vcl_vector< double > vimt_image_2d::pixel_size ( ) const [virtual]

Return 2 element vector indicating the size of a pixel.

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 23 of file vimt_image_2d.cxx.

virtual void vimt_image::print_all ( vcl_ostream &  os) const [pure virtual, inherited]

Print whole image to os.

Implemented in vimt_image_2d_of< T >.

virtual void vimt_image::print_summary ( vcl_ostream &  os) const [pure virtual, inherited]

Print class to os.

Implemented in vimt_image_2d_of< T >.

void vimt_image_2d::set_world2im ( const vimt_transform_2d w2i) [inline]

Set world-to-image transformation.

Deprecated:
in favour of non-const world2im()

Definition at line 57 of file vimt_image_2d.h.

short vimt_image::version_no ( ) const [inherited]

Version number for I/O.

Reimplemented in vimt_image_2d_of< T >.

Definition at line 18 of file vimt_image.cxx.

const vimt_transform_2d& vimt_image_2d::world2im ( ) const [inline]

Current world-to-image transformation.

Definition at line 50 of file vimt_image_2d.h.

vimt_transform_2d& vimt_image_2d::world2im ( ) [inline]

Current world-to-image transformation.

Definition at line 53 of file vimt_image_2d.h.

void vimt_image_2d::world_bounds ( vcl_vector< double > &  b_lo,
vcl_vector< double > &  b_hi 
) const [virtual]

Return vectors defining bounding box containing image in world co-ords.

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 36 of file vimt_image_2d.cxx.


Member Data Documentation

Definition at line 18 of file vimt_image_2d.h.


The documentation for this class was generated from the following files: