General renderer template class. More...
#include <cmtkRenderer.h>
Public Member Functions | |
virtual void | Render () |
Calls to this function should make derived objects update their display. | |
void | SetInput (ImageRGB *const input) |
Set image to display. | |
virtual long | Update () |
The actual Update() function. | |
virtual void | SetActive () |
Make this renderer active. | |
virtual void | SetInactive () |
Make this renderer inactive. | |
virtual int | IsActive () const |
Query activity state of this renderer. | |
Protected Member Functions | |
Renderer () | |
Default constructor. | |
~Renderer () | |
Destructor. | |
Protected Attributes | |
ImageRGB * | Input |
Image to be displayed. | |
Private Types | |
typedef PipelineObject | Superclass |
Convenience declaration for calls to parent class' functions. | |
Private Attributes | |
bool | Active |
Active flag. | |
bool | RenderPending |
Recursion flag. |
General renderer template class.
This class provides a virtual "Render()" function as a common access path for client code. It also provides an ImageRGB input object representing the actual image to be rendered.
Definition at line 51 of file cmtkRenderer.h.
typedef PipelineObject cmtk::Renderer::Superclass [private] |
Convenience declaration for calls to parent class' functions.
Definition at line 112 of file cmtkRenderer.h.
virtual int cmtk::Renderer::IsActive | ( | ) | const [inline, virtual] |
Query activity state of this renderer.
Definition at line 77 of file cmtkRenderer.h.
virtual void cmtk::Renderer::SetActive | ( | ) | [inline, virtual] |
virtual void cmtk::Renderer::SetInactive | ( | ) | [inline, virtual] |
bool cmtk::Renderer::Active [private] |
Active flag.
If this flag is set, the renderer is active. It will display its associated image if Render() is called. If this flag is not set, calls to Render() will result in this object setting its output to size 0.
Definition at line 96 of file cmtkRenderer.h.
ImageRGB* cmtk::Renderer::Input [protected] |
Image to be displayed.
Definition at line 87 of file cmtkRenderer.h.
bool cmtk::Renderer::RenderPending [private] |
Recursion flag.
This flag is used by the Render() method to check whether this viewer is being rendered already. This is necessary, as checking ancestors in the pipeline can lead to calls back to the environment, Tcl for example, for status output. That, in turn can cause calls to the renderer again.
So while this object is in its Render() method, this flag is set to 'true'. If Render() is then called again, the function simply returns without actually updating anything, thus avoiding recursion.
Definition at line 109 of file cmtkRenderer.h.