Go to the documentation of this file.
47 #ifndef vtkParallelRenderManager_h
48 #define vtkParallelRenderManager_h
50 #include "vtkRenderingParallelModule.h"
172 vtkSetMacro(ParallelRendering,
int);
173 vtkGetMacro(ParallelRendering,
int);
174 vtkBooleanMacro(ParallelRendering,
int);
184 vtkSetMacro(RenderEventPropagation,
int);
185 vtkGetMacro(RenderEventPropagation,
int);
186 vtkBooleanMacro(RenderEventPropagation,
int);
205 vtkSetMacro(UseCompositing,
int);
206 vtkGetMacro(UseCompositing,
int);
207 vtkBooleanMacro(UseCompositing,
int);
225 vtkGetMacro(ImageReductionFactor,
double);
228 vtkSetMacro(MaxImageReductionFactor,
double);
229 vtkGetMacro(MaxImageReductionFactor,
double);
245 vtkSetMacro(AutoImageReductionFactor,
int);
246 vtkGetMacro(AutoImageReductionFactor,
int);
247 vtkBooleanMacro(AutoImageReductionFactor,
int);
254 vtkGetMacro(RenderTime,
double);
255 vtkGetMacro(ImageProcessingTime,
double);
268 vtkGetMacro(SyncRenderWindowRenderers,
int);
269 vtkSetMacro(SyncRenderWindowRenderers,
int);
270 vtkBooleanMacro(SyncRenderWindowRenderers,
int);
286 vtkSetMacro(WriteBackImages,
int);
287 vtkGetMacro(WriteBackImages,
int);
288 vtkBooleanMacro(WriteBackImages,
int);
297 vtkSetMacro(MagnifyImages,
int);
298 vtkGetMacro(MagnifyImages,
int);
299 vtkBooleanMacro(MagnifyImages,
int);
311 vtkGetMacro(MagnifyImageMethod,
int);
313 this->SetMagnifyImageMethod(NEAREST);
316 this->SetMagnifyImageMethod(LINEAR);
325 const int fullImageSize[2],
327 const int reducedImageSize[2],
328 const int fullImageViewport[4] =
nullptr,
329 const int reducedImageViewport[4] =
nullptr);
331 const int fullImageSize[2],
333 const int reducedImageSize[2],
334 const int fullImageViewport[4] =
nullptr,
335 const int reducedImageViewport[4] =
nullptr);
337 const int fullImageSize[2],
339 const int reducedImageSize[2],
340 const int fullImageViewport[4] =
nullptr,
341 const int reducedImageViewport[4] =
nullptr);
374 vtkGetVector2Macro(FullImageSize,
int);
380 vtkGetVector2Macro(ReducedImageSize,
int);
394 vtkSetMacro(UseRGBA,
int);
395 vtkGetMacro(UseRGBA,
int);
403 vtkSetMacro(ForceRenderWindowSize,
int);
404 vtkGetMacro(ForceRenderWindowSize,
int);
412 vtkSetVector2Macro(ForcedRenderWindowSize,
int);
413 vtkGetVector2Macro(ForcedRenderWindowSize,
int);
417 RENDER_RMI_TAG=34532,
418 COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG=54636,
421 LIGHT_INFO_TAG=87838,
436 vtkSetMacro(UseBackBuffer,
int);
437 vtkGetMacro(UseBackBuffer,
int);
438 vtkBooleanMacro(UseBackBuffer,
int);
447 vtkSetMacro(SynchronizeTileProperties,
int);
448 vtkGetMacro(SynchronizeTileProperties,
int);
449 vtkBooleanMacro(SynchronizeTileProperties,
int);
482 int ForcedRenderWindowSize[2];
513 int FullImageSize[2];
514 int ReducedImageSize[2];
621 const int pixelDimensions[2]);
640 double TileViewport[4];
655 double CameraPosition[3];
656 double CameraFocalPoint[3];
657 double CameraViewUp[3];
658 double WindowCenter[2];
659 double CameraClippingRange[2];
662 double Background2[3];
678 double FocalPoint[3];
702 #endif //vtkParalleRenderManager_h
~vtkParallelRenderManager() override
double ImageReductionFactor
int ObservingRenderWindow
virtual void CollectWindowInformation(vtkMultiProcessStream &)
Subclass should override these methods (instead of SendWindowInformation/ReceiveWindowInformation or ...
virtual void SetRenderWindow(vtkRenderWindow *renWin)
virtual vtkRenderWindow * MakeRenderWindow()
Builds a vtkRenderWindow compatible with this render manager.
virtual void StopServices()
If on root node, stops the RMI processing on all service nodes.
virtual void SetRenderWindowSize()
Called in satellites to set the render window size to the current FullImageSize and ReducedImageSize ...
vtkRenderWindow * RenderWindow
virtual void RemoveAllRenderers()
void RemoveRenderWindowEventHandlers()
virtual void MagnifyImage(vtkUnsignedCharArray *fullImage, const int fullImageSize[2], vtkUnsignedCharArray *reducedImage, const int reducedImageSize[2], const int fullImageViewport[4]=nullptr, const int reducedImageViewport[4]=nullptr)
Convenience functions for magnifying images.
virtual void ReadReducedImage()
Reads in the reduced image from the RenderWindow.
An object to control parallel rendering.
double AverageTimePerPixel
Used by SetImageReductionFactorForUpdateRate to smooth transitions transitions between image reductio...
unsigned long ResetCameraClippingRangeTag
virtual void GetReducedPixelData(vtkUnsignedCharArray *data)
The most appropriate way to retrieve reduced size image data after a render.
virtual void StartServices()
If on node other than root, starts serving RMI requests for parallel renders.
bool Restore(vtkMultiProcessStream &stream)
virtual void WriteFullImage()
Write the full image back to the RenderWindow.
stream used to pass data across processes using vtkMultiProcessController.
int RenderEventPropagation
virtual vtkRendererCollection * GetRenderers()
virtual void PostRenderProcessing()=0
virtual void StartRender()
Callbacks that initialize and finish rendering and other tasks.
virtual void GenericStartRenderCallback()
INTERNAL METHODS (DON NOT USE).
virtual void GetReducedPixelData(int x1, int y1, int x2, int y2, vtkUnsignedCharArray *data)
dynamic, self-adjusting array of unsigned char
void AddRenderWindowEventHandlers()
Add/Remove event handlers for the render window.
abstract base class for most VTK objects
virtual void CheckForAbortRender()
void Save(vtkMultiProcessStream &stream)
double ImageReductionFactor
static void MagnifyImageLinear(vtkUnsignedCharArray *fullImage, const int fullImageSize[2], vtkUnsignedCharArray *reducedImage, const int reducedImageSize[2], const int fullImageViewport[4]=nullptr, const int reducedImageViewport[4]=nullptr)
an ordered list of renderers
virtual void SendWindowInformation()
Used to synchronize rendering information per frame.
virtual void ComputeVisiblePropBoundsRMI(int renderId)
virtual void PreRenderProcessing()=0
Here is a good place to handle processing of data before and after render.
unsigned long ResetCameraTag
int AutoImageReductionFactor
static bool DefaultRenderEventPropagation
void Save(vtkMultiProcessStream &stream)
virtual void InitializePieces()
This method sets the piece and number of pieces for each actor with a polydata mapper.
unsigned long StartRenderTag
virtual void SetController(vtkMultiProcessController *controller)
unsigned long EndRenderTag
virtual bool ProcessWindowInformation(vtkMultiProcessStream &)
double ImageProcessingTime
int ForceRenderWindowSize
static bool GetDefaultRenderEventPropagation()
virtual vtkRenderer * MakeRenderer()
Builds a vtkRenderer compatible with this render manager.
virtual void ResetCamera(vtkRenderer *ren)
int SynchronizeTileProperties
virtual void GetPixelData(vtkUnsignedCharArray *data)
The most appropriate way to retrieve full size image data after a render.
virtual int ImageReduceRenderer(vtkRenderer *)
Returns true if the image for the given renderer should be rendered at a reduced size to be magnified...
virtual void MagnifyReducedImage()
When called, fills FullImage.
virtual void SatelliteStartRender()
Multiprocessing communication superclass.
a simple class to control print indentation
virtual void SetRenderWindowPixelData(vtkUnsignedCharArray *pixels, const int pixelDimensions[2])
Sets the current render window's pixel data.
vtkMultiProcessController * Controller
int RenderWindowImageUpToDate
virtual void AddRenderer(vtkRenderer *)
unsigned long AbortRenderCheckTag
virtual void CollectRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
unsigned long BoundsRMIId
int RootProcessId
The "root" node's process id.
unsigned long RenderRMIId
virtual void RemoveRenderer(vtkRenderer *)
virtual void StartInteractor()
Initializes the RMIs and then, if on root node, starts the interactor on the attached render window.
virtual void InitializeRMIs()
vtkParallelRenderManager()
virtual void ComputeVisiblePropBounds(vtkRenderer *ren, double bounds[6])
Calculates the bounds by gathering information from all processes.
virtual void SetMagnifyImageMethod(int method)
Sets the method used to magnify images.
bool Restore(vtkMultiProcessStream &stream)
Timer support and logging.
virtual int CheckForAbortComposite()
vtkUnsignedCharArray * ReducedImage
double MaxImageReductionFactor
virtual void ReceiveWindowInformation()
virtual void ResetAllCameras()
Resets the camera of each renderer contained in the RenderWindow.
virtual void SatelliteEndRender()
virtual void GenericEndRenderCallback()
virtual void ReceiveRendererInformation(vtkRenderer *)
virtual void SendRendererInformation(vtkRenderer *)
vtkRendererCollection * Renderers
virtual void SetImageReductionFactorForUpdateRate(double DesiredUpdateRate)
Sets the ReductionFactor based on the given desired update rate and the rendering metrics taken from ...
int SyncRenderWindowRenderers
bool Restore(vtkMultiProcessStream &stream)
abstract specification for renderers
virtual void SetImageReductionFactor(double factor)
Set/Get the reduction factor (for sort-last based parallel renderers).
void SetMagnifyImageMethodToLinear()
virtual int LastRenderInFrontBuffer()
Returns 1 if the RenderWindow's last image is in the front buffer, 0 if it is in the back.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of double
vtkDoubleArray * Viewports
virtual void GetPixelData(int x1, int y1, int x2, int y2, vtkUnsignedCharArray *data)
static void SetDefaultRenderEventPropagation(bool val)
Get/Set the default value used for RenderEventPropagation when a new instance of vtkParallelRenderMan...
void Save(vtkMultiProcessStream &stream)
create a window for renderers to draw into
virtual bool ProcessRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
void SetMagnifyImageMethodToNearest()
virtual void InitializeOffScreen()
Make all rendering windows not viewable set as off screen rendering.
static void MagnifyImageNearest(vtkUnsignedCharArray *fullImage, const int fullImageSize[2], vtkUnsignedCharArray *reducedImage, const int reducedImageSize[2], const int fullImageViewport[4]=nullptr, const int reducedImageViewport[4]=nullptr)
virtual void LocalComputeVisiblePropBounds(vtkRenderer *ren, double bounds[6])
Called by ComputeVisiblePropBoundsRMI to get the bounds of a local renderer.
vtkUnsignedCharArray * FullImage
void TileWindows(int xsize, int ysize, int nColumns)
Given the x and y size of the render windows, reposition them in a tile of n columns.
virtual int ChooseBuffer()
Select buffer to read from / render into.
virtual void ResetCameraClippingRange(vtkRenderer *ren)