vgui_image_tableau Class Reference

#include <vgui_image_tableau.h>

Inheritance diagram for vgui_image_tableau:

Inheritance graph
[legend]

List of all members.


Detailed Description

Tableau which renders the given image using an image_renderer.

Definition at line 33 of file vgui_image_tableau.h.


Public Member Functions

vcl_string type_name () const
 Returns the type of this tableau ('vgui_image_tableau').
vcl_string file_name () const
 Returns the filename of the loaded image.
void set_file_name (const vcl_string &fn)
 Set the filename of the loaded image.
vcl_string pretty_name () const
 Returns a nice version of the name, including details of the image file.
virtual vil1_image get_image () const
 Return the image being rendered by this tableau.
virtual vil_image_view_base_sptr get_image_view () const
 Return the image view being rendered by this tableau.
virtual vil_image_resource_sptr get_image_resource () const
 Return the image resource being rendered by this tableau.
virtual void set_image (vil1_image const &img, vgui_range_map_params_sptr const &rmp)
 Make the given image, the image rendered by this tableau.
virtual void set_image_view (vil_image_view_base const &img, vgui_range_map_params_sptr const &rmp)
 Make the given image view, the image rendered by this tableau.
virtual void set_image_resource (vil_image_resource_sptr const &img, vgui_range_map_params_sptr const &rmp)
 Make the given image resource, the image rendered by this tableau.
virtual void set_image (vil1_image const &img)
 Make the given image, the image rendered by this tableau, but keep old range map.
virtual void set_image_view (vil_image_view_base const &img)
 Make the given image view, the image rendered by this tableau, but keep old range map.
virtual void set_image_resource (vil_image_resource_sptr const &img)
 Make the given image resource, the image rendered by this tableau, but keep old range map.
virtual void set_image_view (char const *filename, vgui_range_map_params_sptr const &rmp=0)
 Make image loaded from the given file, the image rendered by this tableau.
virtual void set_image (char const *filename, vgui_range_map_params_sptr const &rmp=0)
 Make image loaded from the given file, the image rendered by this tableau.
virtual void reread_image ()
 Reread the image from file.
virtual unsigned width () const
 Width of image (0 if none).
virtual unsigned height () const
 Height of image (0 if none).
virtual bool get_bounding_box (float low[3], float high[3]) const
 Returns the box bounding the rendered image.
void center_pixels (bool v=true)
 Sets coordinate to be in the middle or corner of the pixel.
virtual void set_mapping (vgui_range_map_params_sptr const &rmp)
 set the range mapping parameters.
vgui_range_map_params_sptr map_params ()
virtual bool handle (vgui_event const &e)
 Handle all events sent to this tableau.
virtual void get_popup (const vgui_popup_params &, vgui_menu &m)
 Builds a popup menu for the user to modify range mapping.
virtual vcl_string name () const
 Return the name of the tableau.
void get_parents (vcl_vector< vgui_tableau_sptr > *out) const
 Get the parent tableaux for this tableau.
void get_children (vcl_vector< vgui_tableau_sptr > *out) const
 Get the child tableaux for this tableau.
vgui_tableau_sptr get_child (unsigned i) const
 Get the ith child or return 0.
virtual bool add_child (vgui_tableau_sptr const &)
 Add the given tableau to the list of child tableaux.
virtual bool remove_child (vgui_tableau_sptr const &)
 Remove the given child from the list of child tableaux.
virtual bool notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child)
 Called whenever a child of this tableau is about to be forcibly replaced.
virtual void add_popup (vgui_menu &)
 Add the given menu to the popup menu for the tableau.
virtual void post_message (char const *, void const *)
 Post a message event.
virtual void post_redraw ()
 Post a draw event.
virtual void post_overlay_redraw ()
 Post a overlay-redraw event.
virtual void post_idle_request ()
 Post an idle request event.
virtual bool draw ()
 Called by default handle when it receives a draw event.
virtual bool mouse_down (int x, int y, vgui_button, vgui_modifier)
 Called by default handle when it receives a mouse down event.
virtual bool mouse_up (int x, int y, vgui_button, vgui_modifier)
 Called by default handle when it receives a mouse up event.
virtual bool motion (int x, int y)
 Called by handle when it receives a mouse motion event.
virtual bool key_press (int x, int y, vgui_key, vgui_modifier)
 Called by default handle when it receives a key-press event.
virtual bool help ()
 Called by default handle when it receives a '?' pressed event.
virtual bool idle ()
 Called when the application is otherwise idle.
void ref () const
 Increase the reference count by one (for smart pointers).
void unref () const
 Decrease the reference count by one (for smart pointers).

Static Public Member Functions

static void get_all (vcl_vector< vgui_tableau_sptr > *out)
 Push all tableaux onto the given vector.
static bool exists (vgui_tableau_sptr const &)
 Returns true if the given address points to a valid tableau.

Protected Member Functions

 vgui_image_tableau ()
 Constructor - don't use this, use vgui_image_tableau_new.
 vgui_image_tableau (vil1_image const &img, vgui_range_map_params_sptr const &rmp=0)
 Constructor - don't use this, use vgui_image_tableau_new.
 vgui_image_tableau (vil_image_view_base const &img, vgui_range_map_params_sptr const &rmp=0)
 Constructor - don't use this, use vgui_image_tableau_new.
 vgui_image_tableau (vil_image_resource_sptr const &img, vgui_range_map_params_sptr const &rmp=0)
 Constructor - don't use this, use vgui_image_tableau_new.
 vgui_image_tableau (char const *filename, vgui_range_map_params_sptr const &rmp=0)
 Constructor - don't use this, use vgui_image_tableau_new.
virtual ~vgui_image_tableau ()
 Destructor - called by vgui_image_tableau_sptr.

Protected Attributes

vcl_string name_
bool pixels_centered_
vgui_range_map_params_sptr rmp_
vgui_image_rendererrenderer_
vgui_vil_image_renderervil_renderer_

Friends

struct vgui_image_tableau_new

Constructor & Destructor Documentation

vgui_image_tableau::vgui_image_tableau (  )  [protected]

Constructor - don't use this, use vgui_image_tableau_new.

Creates an empty image tableau.

Definition at line 35 of file vgui_image_tableau.cxx.

vgui_image_tableau::vgui_image_tableau ( vil1_image const &  img,
vgui_range_map_params_sptr const &  rmp = 0 
) [protected]

Constructor - don't use this, use vgui_image_tableau_new.

Creates a tableau displaying the given image.

Definition at line 47 of file vgui_image_tableau.cxx.

vgui_image_tableau::vgui_image_tableau ( vil_image_view_base const &  img,
vgui_range_map_params_sptr const &  rmp = 0 
) [protected]

Constructor - don't use this, use vgui_image_tableau_new.

Creates a tableau displaying the given image view.

Definition at line 60 of file vgui_image_tableau.cxx.

vgui_image_tableau::vgui_image_tableau ( vil_image_resource_sptr const &  img,
vgui_range_map_params_sptr const &  rmp = 0 
) [protected]

Constructor - don't use this, use vgui_image_tableau_new.

Creates a tableau displaying the given image resource.

Definition at line 73 of file vgui_image_tableau.cxx.

vgui_image_tableau::vgui_image_tableau ( char const *  filename,
vgui_range_map_params_sptr const &  rmp = 0 
) [protected]

Constructor - don't use this, use vgui_image_tableau_new.

Creates a tableau which loads and displays an image from the given file. File loaded as a vil1_image.

Definition at line 86 of file vgui_image_tableau.cxx.

vgui_image_tableau::~vgui_image_tableau (  )  [protected, virtual]

Destructor - called by vgui_image_tableau_sptr.

Definition at line 100 of file vgui_image_tableau.cxx.


Member Function Documentation

vcl_string vgui_image_tableau::type_name (  )  const [virtual]

Returns the type of this tableau ('vgui_image_tableau').

Reimplemented from vgui_tableau.

Definition at line 112 of file vgui_image_tableau.cxx.

vcl_string vgui_image_tableau::file_name (  )  const [virtual]

Returns the filename of the loaded image.

It will not know this if the tableau was constructed from a vil1_image, only if the filename was given to the constructor.

Reimplemented from vgui_tableau.

Definition at line 122 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_file_name ( const vcl_string &  fn  )  [inline]

Set the filename of the loaded image.

It could be used to identify a specific image

Definition at line 54 of file vgui_image_tableau.h.

vcl_string vgui_image_tableau::pretty_name (  )  const [virtual]

Returns a nice version of the name, including details of the image file.

Reimplemented from vgui_tableau.

Definition at line 131 of file vgui_image_tableau.cxx.

vil1_image vgui_image_tableau::get_image (  )  const [virtual]

Return the image being rendered by this tableau.

Definition at line 140 of file vgui_image_tableau.cxx.

vil_image_view_base_sptr vgui_image_tableau::get_image_view (  )  const [virtual]

Return the image view being rendered by this tableau.

Definition at line 152 of file vgui_image_tableau.cxx.

vil_image_resource_sptr vgui_image_tableau::get_image_resource (  )  const [virtual]

Return the image resource being rendered by this tableau.

Definition at line 164 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image ( vil1_image const &  img,
vgui_range_map_params_sptr const &  rmp 
) [virtual]

Make the given image, the image rendered by this tableau.

Definition at line 210 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image_view ( vil_image_view_base const &  img,
vgui_range_map_params_sptr const &  rmp 
) [virtual]

Make the given image view, the image rendered by this tableau.

Definition at line 188 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image_resource ( vil_image_resource_sptr const &  img,
vgui_range_map_params_sptr const &  rmp 
) [virtual]

Make the given image resource, the image rendered by this tableau.

Definition at line 199 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image ( vil1_image const &  img  )  [virtual]

Make the given image, the image rendered by this tableau, but keep old range map.

Definition at line 249 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image_view ( vil_image_view_base const &  img  )  [virtual]

Make the given image view, the image rendered by this tableau, but keep old range map.

Definition at line 221 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image_resource ( vil_image_resource_sptr const &  img  )  [virtual]

Make the given image resource, the image rendered by this tableau, but keep old range map.

Definition at line 230 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image_view ( char const *  filename,
vgui_range_map_params_sptr const &  rmp = 0 
) [virtual]

Make image loaded from the given file, the image rendered by this tableau.

The image will be stored as a vil_image_view_base, and thus can be retrieved with get_image_view() but not with get_image().

Definition at line 176 of file vgui_image_tableau.cxx.

void vgui_image_tableau::set_image ( char const *  filename,
vgui_range_map_params_sptr const &  rmp = 0 
) [virtual]

Make image loaded from the given file, the image rendered by this tableau.

The image will be stored as a vil1_image, and thus can be retrieved with get_image() but not with get_image_view().

Definition at line 268 of file vgui_image_tableau.cxx.

void vgui_image_tableau::reread_image (  )  [virtual]

Reread the image from file.

Definition at line 281 of file vgui_image_tableau.cxx.

unsigned vgui_image_tableau::width (  )  const [virtual]

Width of image (0 if none).

Definition at line 291 of file vgui_image_tableau.cxx.

unsigned vgui_image_tableau::height (  )  const [virtual]

Height of image (0 if none).

Definition at line 305 of file vgui_image_tableau.cxx.

bool vgui_image_tableau::get_bounding_box ( float  low[3],
float  high[3] 
) const [virtual]

Returns the box bounding the rendered image.

Reimplemented from vgui_tableau.

Definition at line 319 of file vgui_image_tableau.cxx.

void vgui_image_tableau::center_pixels ( bool  v = true  )  [inline]

Sets coordinate to be in the middle or corner of the pixel.

This method controls whether the coordinate (i, j) is the corner of pixel (i, j) or in the middle.

Definition at line 116 of file vgui_image_tableau.h.

void vgui_image_tableau::set_mapping ( vgui_range_map_params_sptr const &  rmp  )  [virtual]

set the range mapping parameters.

image (if it exists) is re-rendered with the map. the mapping is defined on the input pixel domain [min, max] gamma is the usual photometric non-linear correction invert reverses the map (a negative version of the image) set_mapping should be called before set_image methods to insure the first image display has the requested mapping parameters

Definition at line 365 of file vgui_image_tableau.cxx.

vgui_range_map_params_sptr vgui_image_tableau::map_params (  )  [inline]

Definition at line 127 of file vgui_image_tableau.h.

bool vgui_image_tableau::handle ( vgui_event const &  e  )  [virtual]

Handle all events sent to this tableau.

In particular, use draw events to render the image contained in this tableau.

Reimplemented from vgui_tableau.

Definition at line 332 of file vgui_image_tableau.cxx.

void vgui_image_tableau::get_popup ( const vgui_popup_params params,
vgui_menu m 
) [virtual]

Builds a popup menu for the user to modify range mapping.

Builds a popup menu for the user to set range mapping parameters.

Over-rides function in vgui_tableau.

Reimplemented from vgui_tableau.

Definition at line 462 of file vgui_image_tableau.cxx.

virtual vcl_string vgui_tableau::name ( void   )  const [inline, virtual, inherited]

Return the name of the tableau.

Reimplemented in vgui_easy2D_tableau.

Definition at line 90 of file vgui_tableau.h.

void vgui_tableau::get_parents ( vcl_vector< vgui_tableau_sptr > *  out  )  const [inherited]

Get the parent tableaux for this tableau.

Push parents onto the given vcl_vector.

Definition at line 260 of file vgui_tableau.cxx.

void vgui_tableau::get_children ( vcl_vector< vgui_tableau_sptr > *  out  )  const [inherited]

Get the child tableaux for this tableau.

Push children onto the given vcl_vector.

Definition at line 267 of file vgui_tableau.cxx.

vgui_tableau_sptr vgui_tableau::get_child ( unsigned  i  )  const [inherited]

Get the ith child or return 0.

Get the ith child, or return 0.

Definition at line 274 of file vgui_tableau.cxx.

bool vgui_tableau::add_child ( vgui_tableau_sptr const &   )  [virtual, inherited]

Add the given tableau to the list of child tableaux.

Virtual overridden by consenting parents.

Reimplemented in vgui_composite_tableau, vgui_deck_tableau, and vgui_wrapper_tableau.

Definition at line 284 of file vgui_tableau.cxx.

bool vgui_tableau::remove_child ( vgui_tableau_sptr const &   )  [virtual, inherited]

Remove the given child from the list of child tableaux.

Remove the given tableau from the list of child tableaux.

Reimplemented in vgui_composite_tableau, vgui_deck_tableau, and vgui_wrapper_tableau.

Definition at line 291 of file vgui_tableau.cxx.

void vgui_tableau::get_all ( vcl_vector< vgui_tableau_sptr > *  out  )  [static, inherited]

Push all tableaux onto the given vector.

Definition at line 376 of file vgui_tableau.cxx.

bool vgui_tableau::exists ( vgui_tableau_sptr const &  ptr  )  [static, inherited]

Returns true if the given address points to a valid tableau.

Definition at line 385 of file vgui_tableau.cxx.

bool vgui_tableau::notify_replaced_child ( vgui_tableau_sptr const &  old_child,
vgui_tableau_sptr const &  new_child 
) [virtual, inherited]

Called whenever a child of this tableau is about to be forcibly replaced.

Called when a child of this tableau is forcibly replaced.

This method is called when some part of the program (typically the parent_child_link mechanism) is about to forcibly replace a child of this tableau. The canonical reason to override this is in order to invalidate caches.

Definition at line 302 of file vgui_tableau.cxx.

void vgui_tableau::add_popup ( vgui_menu  )  [virtual, inherited]

Add the given menu to the popup menu for the tableau.

Add given menu to the tableau popup menu.

This method is for tableaux to implement if they want to _add_ some items to the popup menu. They can assign to or clear 'menu', but that is not recommended as it would remove what other tableaux put there. The recommended usage is to .add() items or to .include() another menu.

** This is an interface method. it abstracts a behaviour. **

Reimplemented in vgui_active_tableau, vgui_clear_tableau, and vgui_satellite_tableau_t< object, data >.

Definition at line 316 of file vgui_tableau.cxx.

void vgui_tableau::post_message ( char const *  msg,
void const *  data 
) [virtual, inherited]

Post a message event.

The fact that this is virtual does not imply that you should go and override it.

Reimplemented in vgui_adaptor_tableau.

Definition at line 205 of file vgui_tableau.cxx.

void vgui_tableau::post_redraw ( void   )  [virtual, inherited]

Post a draw event.

The fact that this is virtual does not imply that you should go and override it.

Reimplemented in vgui_adaptor_tableau.

Definition at line 215 of file vgui_tableau.cxx.

void vgui_tableau::post_overlay_redraw ( void   )  [virtual, inherited]

Post a overlay-redraw event.

Post a overlay redraw event.

The fact that this is virtual does not imply that you should go and override it.

Reimplemented in vgui_adaptor_tableau.

Definition at line 225 of file vgui_tableau.cxx.

void vgui_tableau::post_idle_request ( void   )  [virtual, inherited]

Post an idle request event.

The fact that this is virtual does not imply that you should go and override it.

Posting an idle event request means that your tableau has some idle processing that it'd like to do. This means that your tableau will continue to receive vgui_IDLE events until the event handler returns false (i.e. all idle processing is complete). The idle event handler should return false when it has no idle processing, or has completed its idle processing. It may return true if has only partially completed its idle processing; in this case, it will receive more idle event to allow it to complete processing.

Reimplemented in vgui_adaptor_tableau.

Definition at line 235 of file vgui_tableau.cxx.

bool vgui_tableau::draw (  )  [virtual, inherited]

Called by default handle when it receives a draw event.

Reimplemented in vgui_function_tableau.

Definition at line 176 of file vgui_tableau.cxx.

bool vgui_tableau::mouse_down ( int  x,
int  y,
vgui_button  ,
vgui_modifier   
) [virtual, inherited]

Called by default handle when it receives a mouse down event.

Reimplemented in vgui_displaylist2D_tableau, vgui_displaylist3D_tableau, vgui_function_tableau, vgui_listmanager2D_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.

Definition at line 126 of file vgui_tableau.cxx.

bool vgui_tableau::mouse_up ( int  x,
int  y,
vgui_button  ,
vgui_modifier   
) [virtual, inherited]

Called by default handle when it receives a mouse up event.

Reimplemented in vgui_function_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.

Definition at line 136 of file vgui_tableau.cxx.

bool vgui_tableau::motion ( int  x,
int  y 
) [virtual, inherited]

Called by handle when it receives a mouse motion event.

Called by default handle when it receives a mouse motion event.

Reimplemented in vgui_displaylist2D_tableau, vgui_function_tableau, and vgui_listmanager2D_tableau.

Definition at line 146 of file vgui_tableau.cxx.

bool vgui_tableau::key_press ( int  x,
int  y,
vgui_key  ,
vgui_modifier   
) [virtual, inherited]

Called by default handle when it receives a key-press event.

Caled by default handle when it receives a key press event.

Reimplemented in vgui_deck_tableau, vgui_function_tableau, vgui_listmanager2D_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.

Definition at line 156 of file vgui_tableau.cxx.

bool vgui_tableau::help (  )  [virtual, inherited]

Called by default handle when it receives a '?' pressed event.

Reimplemented in vgui_composite_tableau, vgui_deck_tableau, vgui_function_tableau, vgui_listmanager2D_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.

Definition at line 166 of file vgui_tableau.cxx.

bool vgui_tableau::idle (  )  [virtual, inherited]

Called when the application is otherwise idle.

Override if you want to do idle processing. Return false once your idle processing is complete, or if you have no need for more idle processing. Return true if you need more idle processing time.

Definition at line 185 of file vgui_tableau.cxx.

void vgui_tableau::ref (  )  const [inherited]

Increase the reference count by one (for smart pointers).

Increase the reference count by one (for smart-pointers).

"const" is for convenience, it is cast away internally.

Definition at line 79 of file vgui_tableau.cxx.

void vgui_tableau::unref (  )  const [inherited]

Decrease the reference count by one (for smart pointers).

Decrease the reference count by one (for smart-pointers).

"const" is for convenience, it is cast away internally. If the reference count reaches zero then delete the object.

If the reference count reaches zero then delete the object.

Definition at line 87 of file vgui_tableau.cxx.


Friends And Related Function Documentation

friend struct vgui_image_tableau_new [friend]

Definition at line 139 of file vgui_image_tableau.h.


Member Data Documentation

vcl_string vgui_image_tableau::name_ [protected]

Definition at line 37 of file vgui_image_tableau.h.

Definition at line 38 of file vgui_image_tableau.h.

Definition at line 39 of file vgui_image_tableau.h.

Definition at line 40 of file vgui_image_tableau.h.

Definition at line 41 of file vgui_image_tableau.h.


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

Generated on Sun Nov 22 06:22:02 2009 for core/vgui by  doxygen 1.5.5