Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkCompositeManager Class Reference

`#include <vtkCompositeManager.h>`

Inheritance diagram for vtkCompositeManager:

[legend]
Collaboration diagram for vtkCompositeManager:

[legend]
List of all members.

## Detailed Description

An object to composite multiple render windows.

Date:
  2002/11/21 16:18:47

Revision:
  1.17

vtkCompositeManager operates in multiple processes. Each compositer has a render window. They use vtkMultiProcessControllers to comunicate the color and depth buffer to process 0's render window. Subclass implementation may not handle transparency well.

Attention:
  You should set up the renders and render window interactor before setting the compositers render window. We set up observers on the renderer, An have no easy way of knowing when the renderers change. We could create AddRenderer and RemoveRenderer events ...

See also:
  vtkMultiProcessController vtkRenderWindow.

Created by:
  - Law, Charles

CVS contributions (if > 5%):
  - Hoffman, Bill (45%)
  - Law, Charles (25%)
  - Geveci, Berk (16%)
  - Cedilnik, Andy (10%)

CVS logs (CVSweb):
  - .`h` (`/Parallel/vtkCompositeManager.h)`
  - .`cxx` (`/Parallel/vtkCompositeManager.cxx)`

Examples:
  vtkCompositeManager (Examples)

Tests:
  vtkCompositeManager (Tests)

Definition at line 69 of file vtkCompositeManager.h.

## Public Types

typedef vtkObject | Superclass
enum | Tags { RENDER_RMI_TAG = 12721, COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG = 56563, WIN_INFO_TAG = 22134, REN_INFO_TAG = 22135, BOUNDS_TAG = 94135 }

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
void | InitializePieces ()
void | InitializeOffScreen ()
virtual void | InitializeRMIs ()
float | GetZ (int x, int y)
virtual void | ComputeVisiblePropBounds (vtkRenderer *ren, float bounds[6])
virtual vtkRenderWindow * | GetRenderWindow ()
virtual void | SetRenderWindow (vtkRenderWindow *renWin)
void | StartInteractor ()
void | ExitInteractor ()
virtual void | StartRender ()
virtual void | EndRender ()
virtual void | SatelliteStartRender ()
virtual void | SatelliteEndRender ()
void | RenderRMI ()
void | ResetCamera (vtkRenderer *ren)
void | ResetCameraClippingRange (vtkRenderer *ren)
void | ComputeVisiblePropBoundsRMI ()
void | SetReductionFactor (int factor)
virtual int | GetReductionFactor ()
void | SetUseChar (int useChar)
virtual int | GetUseChar ()
virtual void | UseCharOn ()
virtual void | UseCharOff ()
void | SetUseRGB (int useRGB)
virtual int | GetUseRGB ()
virtual void | UseRGBOn ()
virtual void | UseRGBOff ()
virtual void | SetUseCompositing (int)
virtual int | GetUseCompositing ()
virtual void | UseCompositingOn ()
virtual void | UseCompositingOff ()
virtual double | GetGetBuffersTime ()
virtual double | GetSetBuffersTime ()
virtual double | GetCompositeTime ()
virtual double | GetMaxRenderTime ()
void | SetController (vtkMultiProcessController *controller)
virtual vtkMultiProcessController * | GetController ()
virtual void | CheckForAbortRender ()
virtual int | CheckForAbortComposite ()
virtual void | SetManual (int)
virtual int | GetManual ()
virtual void | ManualOn ()
virtual void | ManualOff ()
void | Composite ()
virtual void | SetCompositer (vtkCompositer *)
virtual vtkCompositer * | GetCompositer ()
void | SetNumberOfProcesses (int numProcs)
virtual int | GetNumberOfProcesses ()

## Static Public Methods

vtkCompositeManager * | New ()
int | IsTypeOf (const char *type)
vtkCompositeManager * | SafeDownCast (vtkObject *o)
void | DeleteArray (vtkDataArray *da)
void | ResizeFloatArray (vtkFloatArray *fa, int numComp, vtkIdType size)
void | ResizeUnsignedCharArray (vtkUnsignedCharArray *uca, int numComp, vtkIdType size)

## Protected Methods

| vtkCompositeManager ()
| ~vtkCompositeManager ()
void | SetRendererSize (int x, int y)
void | MagnifyBuffer (vtkDataArray *localPdata, vtkDataArray *magPdata, int windowSize[2])
void | ReallocPDataArrays ()
void | SetRenderWindowInteractor (vtkRenderWindowInteractor *iren)

## Protected Attributes

vtkRenderWindow * | RenderWindow
vtkRenderWindowInteractor * | RenderWindowInteractor
vtkMultiProcessController * | Controller
unsigned long | StartInteractorTag
unsigned long | EndInteractorTag
unsigned long | StartTag
unsigned long | EndTag
unsigned long | ResetCameraTag
unsigned long | ResetCameraClippingRangeTag
int | UseChar
int | UseRGB
int | UseCompositing
vtkCompositer * | Compositer
int | NumberOfProcesses
vtkDataArray * | PData
vtkFloatArray * | ZData
vtkDataArray * | LocalPData
vtkFloatArray * | LocalZData
int | RendererSize [2]
int | ReductionFactor
int | Lock
double | GetBuffersTime
double | SetBuffersTime
double | CompositeTime
double | MaxRenderTime
vtkTimerLog * | Timer
int | Manual
int | FirstRender

## Member Typedef Documentation

typedef vtkObject vtkCompositeManager::Superclass

| Reimplemented from vtkObject. Reimplemented in vtkTreeComposite. Definition at line 73 of file vtkCompositeManager.h.

## Member Enumeration Documentation

enum vtkCompositeManager::Tags

Enumeration values:

  RENDER_RMI_TAG |
  COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG |
  WIN_INFO_TAG |
  REN_INFO_TAG |
  BOUNDS_TAG |

Definition at line 168 of file vtkCompositeManager.h.

## Constructor & Destructor Documentation

vtkCompositeManager::vtkCompositeManager | ( |  | ) | `[protected]`

vtkCompositeManager::~vtkCompositeManager | ( |  | ) | `[protected]`

## Member Function Documentation

vtkCompositeManager* vtkCompositeManager::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

virtual const char* vtkCompositeManager::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

int vtkCompositeManager::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

virtual int vtkCompositeManager::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

vtkCompositeManager* vtkCompositeManager::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

void vtkCompositeManager::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkTreeComposite.

virtual vtkRenderWindow* vtkCompositeManager::GetRenderWindow | ( |  | ) | `[virtual]`

| Set/Get the RenderWindow to use for compositing. We add a start and end observer to the window.

virtual void vtkCompositeManager::SetRenderWindow | ( | vtkRenderWindow * | renWin | ) | `[virtual]`

| Set/Get the RenderWindow to use for compositing. We add a start and end observer to the window.

void vtkCompositeManager::InitializePieces | ( |  | ) |

| This method sets the piece and number of pieces for each actor with a polydata mapper. My other option is to do it every render, but that would force a partioning scheme.

void vtkCompositeManager::InitializeOffScreen | ( |  | ) |

| turn off screen rendering on for the

void vtkCompositeManager::StartInteractor | ( |  | ) |

| Callbacks that initialize and finish the compositing.

void vtkCompositeManager::ExitInteractor | ( |  | ) |

| Callbacks that initialize and finish the compositing.

virtual void vtkCompositeManager::StartRender | ( |  | ) | `[virtual]`

| Callbacks that initialize and finish the compositing.

virtual void vtkCompositeManager::EndRender | ( |  | ) | `[virtual]`

| Callbacks that initialize and finish the compositing.

virtual void vtkCompositeManager::SatelliteStartRender | ( |  | ) | `[virtual]`

| Callbacks that initialize and finish the compositing.

virtual void vtkCompositeManager::SatelliteEndRender | ( |  | ) | `[virtual]`

| Callbacks that initialize and finish the compositing.

void vtkCompositeManager::RenderRMI | ( |  | ) |

| Callbacks that initialize and finish the compositing.

void vtkCompositeManager::ResetCamera | ( | vtkRenderer * | ren | ) |

| Callbacks that initialize and finish the compositing.

void vtkCompositeManager::ResetCameraClippingRange | ( | vtkRenderer * | ren | ) |

| Callbacks that initialize and finish the compositing.

void vtkCompositeManager::ComputeVisiblePropBoundsRMI | ( |  | ) |

| Callbacks that initialize and finish the compositing.

virtual void vtkCompositeManager::InitializeRMIs | ( |  | ) | `[virtual]`

| If the user wants to handle the event loop, then they must call this method to initialize the RMIs.

void vtkCompositeManager::SetReductionFactor | ( | int | factor | ) |

| The reduction facor makes the transfered images smaller to decrease the render time. The final image is pixel replicated to be the original size. This option can be used by an interactor style to help get desired frame rates. The factor only needs to be set on process 0. Call SetRenderWindow before calling SetReductionFactor.

virtual int vtkCompositeManager::GetReductionFactor | ( |  | ) | `[virtual]`

| The reduction facor makes the transfered images smaller to decrease the render time. The final image is pixel replicated to be the original size. This option can be used by an interactor style to help get desired frame rates. The factor only needs to be set on process 0. Call SetRenderWindow before calling SetReductionFactor.

void vtkCompositeManager::SetUseChar | ( | int | useChar | ) |

| This flag tells the compositer to use char values for pixel data rather than float. Default is float. I have seen some artifacts on some systems with char.

virtual int vtkCompositeManager::GetUseChar | ( |  | ) | `[virtual]`

| This flag tells the compositer to use char values for pixel data rather than float. Default is float. I have seen some artifacts on some systems with char.

virtual void vtkCompositeManager::UseCharOn | ( |  | ) | `[virtual]`

| This flag tells the compositer to use char values for pixel data rather than float. Default is float. I have seen some artifacts on some systems with char.

virtual void vtkCompositeManager::UseCharOff | ( |  | ) | `[virtual]`

| This flag tells the compositer to use char values for pixel data rather than float. Default is float. I have seen some artifacts on some systems with char.

void vtkCompositeManager::SetUseRGB | ( | int | useRGB | ) |

| This flag tells the compositier to get the color buffer as RGB instead of RGBA. We do not use the alpha value so it is not important to get. ATI Radeon cards / drivers do not properly get the color buffer as RGBA. This flag turns the UseChar flag on because VTK does not have methods to get the pixel data as RGB float.

virtual int vtkCompositeManager::GetUseRGB | ( |  | ) | `[virtual]`

| This flag tells the compositier to get the color buffer as RGB instead of RGBA. We do not use the alpha value so it is not important to get. ATI Radeon cards / drivers do not properly get the color buffer as RGBA. This flag turns the UseChar flag on because VTK does not have methods to get the pixel data as RGB float.

virtual void vtkCompositeManager::UseRGBOn | ( |  | ) | `[virtual]`

| This flag tells the compositier to get the color buffer as RGB instead of RGBA. We do not use the alpha value so it is not important to get. ATI Radeon cards / drivers do not properly get the color buffer as RGBA. This flag turns the UseChar flag on because VTK does not have methods to get the pixel data as RGB float.

virtual void vtkCompositeManager::UseRGBOff | ( |  | ) | `[virtual]`

| This flag tells the compositier to get the color buffer as RGB instead of RGBA. We do not use the alpha value so it is not important to get. ATI Radeon cards / drivers do not properly get the color buffer as RGBA. This flag turns the UseChar flag on because VTK does not have methods to get the pixel data as RGB float.

virtual void vtkCompositeManager::SetUseCompositing | ( | int |  | ) | `[virtual]`

| This flag turns the compositer on or off.

virtual int vtkCompositeManager::GetUseCompositing | ( |  | ) | `[virtual]`

| This flag turns the compositer on or off.

virtual void vtkCompositeManager::UseCompositingOn | ( |  | ) | `[virtual]`

| This flag turns the compositer on or off.

virtual void vtkCompositeManager::UseCompositingOff | ( |  | ) | `[virtual]`

| This flag turns the compositer on or off.

virtual double vtkCompositeManager::GetGetBuffersTime | ( |  | ) | `[virtual]`

| Get the times to set/get the buffers, Composite, and the time it takes all processes to finish the rendering step.

virtual double vtkCompositeManager::GetSetBuffersTime | ( |  | ) | `[virtual]`

| Get the times to set/get the buffers, Composite, and the time it takes all processes to finish the rendering step.

virtual double vtkCompositeManager::GetCompositeTime | ( |  | ) | `[virtual]`

| Get the times to set/get the buffers, Composite, and the time it takes all processes to finish the rendering step.

virtual double vtkCompositeManager::GetMaxRenderTime | ( |  | ) | `[virtual]`

| Get the times to set/get the buffers, Composite, and the time it takes all processes to finish the rendering step.

float vtkCompositeManager::GetZ | ( | int | x,
|  | int | y
| ) |

| Get the value of the z buffer at a position.

void vtkCompositeManager::SetController | ( | vtkMultiProcessController * | controller | ) |

| Set/Get the controller use in compositing (set to the global controller by default) If not using the default, this must be called before any other methods.

virtual vtkMultiProcessController* vtkCompositeManager::GetController | ( |  | ) | `[virtual]`

| Set/Get the controller use in compositing (set to the global controller by default) If not using the default, this must be called before any other methods.

virtual void vtkCompositeManager::CheckForAbortRender | ( |  | ) | `[inline, virtual]`

| Used by call backs. Not intended to be called by the user. Empty methods that can be used by the subclass to interupt a parallel render. Definition at line 180 of file vtkCompositeManager.h.

virtual int vtkCompositeManager::CheckForAbortComposite | ( |  | ) | `[inline, virtual]`

| Used by call backs. Not intended to be called by the user. Empty methods that can be used by the subclass to interupt a parallel render. Definition at line 181 of file vtkCompositeManager.h.

virtual void vtkCompositeManager::ComputeVisiblePropBounds | ( | vtkRenderer * | ren,
|  | float | bounds[6]
| ) | `[virtual]`

| Calculate the bounds by gather information from all processes

virtual void vtkCompositeManager::SetManual | ( | int |  | ) | `[virtual]`

| This is for manually compositing. By default Manual is off. When manual compositing is on, then the user must call Render and Composite on each process. The start and end render are not setup in manual mode.

virtual int vtkCompositeManager::GetManual | ( |  | ) | `[virtual]`

| This is for manually compositing. By default Manual is off. When manual compositing is on, then the user must call Render and Composite on each process. The start and end render are not setup in manual mode.

virtual void vtkCompositeManager::ManualOn | ( |  | ) | `[virtual]`

| This is for manually compositing. By default Manual is off. When manual compositing is on, then the user must call Render and Composite on each process. The start and end render are not setup in manual mode.

virtual void vtkCompositeManager::ManualOff | ( |  | ) | `[virtual]`

| This is for manually compositing. By default Manual is off. When manual compositing is on, then the user must call Render and Composite on each process. The start and end render are not setup in manual mode.

void vtkCompositeManager::Composite | ( |  | ) |

| This is for manually compositing. By default Manual is off. When manual compositing is on, then the user must call Render and Composite on each process. The start and end render are not setup in manual mode.

virtual void vtkCompositeManager::SetCompositer | ( | vtkCompositer * |  | ) | `[virtual]`

| This methods allows the user to select different compositing algorithms. A vtkCompressCompositer is created as a default value.

virtual vtkCompositer* vtkCompositeManager::GetCompositer | ( |  | ) | `[virtual]`

| This methods allows the user to select different compositing algorithms. A vtkCompressCompositer is created as a default value.

void vtkCompositeManager::DeleteArray | ( | vtkDataArray * | da | ) | `[static]`

| Methods that allocate and delete memory with special MPIPro calls.

void vtkCompositeManager::ResizeFloatArray | ( | vtkFloatArray * | fa,
|  | int | numComp,
|  | vtkIdType | size
| ) | `[static]`

| Methods that allocate and delete memory with special MPIPro calls.

void vtkCompositeManager::ResizeUnsignedCharArray | ( | vtkUnsignedCharArray * | uca,
|  | int | numComp,
|  | vtkIdType | size
| ) | `[static]`

| Methods that allocate and delete memory with special MPIPro calls.

void vtkCompositeManager::SetNumberOfProcesses | ( | int | numProcs | ) |

| This is here as a temporary hack until I can get sub-worlds (communicators) working. It restricts compositing to occur on the first N processes.

virtual int vtkCompositeManager::GetNumberOfProcesses | ( |  | ) | `[virtual]`

| This is here as a temporary hack until I can get sub-worlds (communicators) working. It restricts compositing to occur on the first N processes.

void vtkCompositeManager::SetRendererSize | ( | int | x,
|  | int | y
| ) | `[protected]`

void vtkCompositeManager::MagnifyBuffer | ( | vtkDataArray * | localPdata,
|  | vtkDataArray * | magPdata,
|  | int | windowSize[2]
| ) | `[protected]`

void vtkCompositeManager::ReallocPDataArrays | ( |  | ) | `[protected]`

void vtkCompositeManager::SetRenderWindowInteractor | ( | vtkRenderWindowInteractor * | iren | ) | `[protected]`

## Member Data Documentation

vtkRenderWindow* vtkCompositeManager::RenderWindow`[protected]`

| Definition at line 233 of file vtkCompositeManager.h.

vtkRenderWindowInteractor* vtkCompositeManager::RenderWindowInteractor`[protected]`

| Definition at line 234 of file vtkCompositeManager.h.

vtkMultiProcessController* vtkCompositeManager::Controller`[protected]`

| Definition at line 235 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::StartInteractorTag`[protected]`

| Definition at line 237 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::EndInteractorTag`[protected]`

| Definition at line 238 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::StartTag`[protected]`

| Definition at line 239 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::EndTag`[protected]`

| Definition at line 240 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::ResetCameraTag`[protected]`

| Definition at line 241 of file vtkCompositeManager.h.

unsigned long vtkCompositeManager::ResetCameraClippingRangeTag`[protected]`

| Definition at line 242 of file vtkCompositeManager.h.

int vtkCompositeManager::UseChar`[protected]`

| Definition at line 243 of file vtkCompositeManager.h.

int vtkCompositeManager::UseRGB`[protected]`

| Definition at line 244 of file vtkCompositeManager.h.

int vtkCompositeManager::UseCompositing`[protected]`

| Definition at line 245 of file vtkCompositeManager.h.

vtkCompositer* vtkCompositeManager::Compositer`[protected]`

| Definition at line 253 of file vtkCompositeManager.h.

int vtkCompositeManager::NumberOfProcesses`[protected]`

| Definition at line 254 of file vtkCompositeManager.h.

vtkDataArray* vtkCompositeManager::PData`[protected]`

| Definition at line 257 of file vtkCompositeManager.h.

vtkFloatArray* vtkCompositeManager::ZData`[protected]`

| Definition at line 258 of file vtkCompositeManager.h.

vtkDataArray* vtkCompositeManager::LocalPData`[protected]`

| Definition at line 259 of file vtkCompositeManager.h.

vtkFloatArray* vtkCompositeManager::LocalZData`[protected]`

| Definition at line 260 of file vtkCompositeManager.h.

int vtkCompositeManager::RendererSize[2]`[protected]`

| Definition at line 261 of file vtkCompositeManager.h.

int vtkCompositeManager::ReductionFactor`[protected]`

| Definition at line 264 of file vtkCompositeManager.h.

int vtkCompositeManager::Lock`[protected]`

| Definition at line 271 of file vtkCompositeManager.h.

double vtkCompositeManager::GetBuffersTime`[protected]`

| Definition at line 273 of file vtkCompositeManager.h.

double vtkCompositeManager::SetBuffersTime`[protected]`

| Definition at line 274 of file vtkCompositeManager.h.

double vtkCompositeManager::CompositeTime`[protected]`

| Definition at line 275 of file vtkCompositeManager.h.

double vtkCompositeManager::MaxRenderTime`[protected]`

| Definition at line 276 of file vtkCompositeManager.h.

vtkTimerLog* vtkCompositeManager::Timer`[protected]`

| Definition at line 279 of file vtkCompositeManager.h.

int vtkCompositeManager::Manual`[protected]`

| Definition at line 282 of file vtkCompositeManager.h.

int vtkCompositeManager::FirstRender`[protected]`

| Definition at line 284 of file vtkCompositeManager.h.

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

- Parallel/vtkCompositeManager.h