 |
VTK
9.1.0
|
Go to the documentation of this file.
50 #ifndef vtkParallelRenderManager_h
51 #define vtkParallelRenderManager_h
54 #include "vtkRenderingParallelModule.h"
175 vtkSetMacro(ParallelRendering,
int);
176 vtkGetMacro(ParallelRendering,
int);
177 vtkBooleanMacro(ParallelRendering,
int);
187 vtkSetMacro(RenderEventPropagation,
int);
188 vtkGetMacro(RenderEventPropagation,
int);
189 vtkBooleanMacro(RenderEventPropagation,
int);
212 vtkSetMacro(UseCompositing,
int);
213 vtkGetMacro(UseCompositing,
int);
214 vtkBooleanMacro(UseCompositing,
int);
232 vtkGetMacro(ImageReductionFactor,
double);
235 vtkSetMacro(MaxImageReductionFactor,
double);
236 vtkGetMacro(MaxImageReductionFactor,
double);
252 vtkSetMacro(AutoImageReductionFactor,
int);
253 vtkGetMacro(AutoImageReductionFactor,
int);
254 vtkBooleanMacro(AutoImageReductionFactor,
int);
261 vtkGetMacro(RenderTime,
double);
262 vtkGetMacro(ImageProcessingTime,
double);
275 vtkGetMacro(SyncRenderWindowRenderers,
int);
276 vtkSetMacro(SyncRenderWindowRenderers,
int);
277 vtkBooleanMacro(SyncRenderWindowRenderers,
int);
293 vtkSetMacro(WriteBackImages,
int);
294 vtkGetMacro(WriteBackImages,
int);
295 vtkBooleanMacro(WriteBackImages,
int);
304 vtkSetMacro(MagnifyImages,
int);
305 vtkGetMacro(MagnifyImages,
int);
306 vtkBooleanMacro(MagnifyImages,
int);
322 vtkGetMacro(MagnifyImageMethod,
int);
333 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
336 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
339 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
370 vtkGetVector2Macro(FullImageSize,
int);
376 vtkGetVector2Macro(ReducedImageSize,
int);
390 vtkSetMacro(UseRGBA,
int);
391 vtkGetMacro(UseRGBA,
int);
399 vtkSetMacro(ForceRenderWindowSize,
int);
400 vtkGetMacro(ForceRenderWindowSize,
int);
408 vtkSetVector2Macro(ForcedRenderWindowSize,
int);
409 vtkGetVector2Macro(ForcedRenderWindowSize,
int);
414 RENDER_RMI_TAG = 34532,
415 COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG = 54636,
416 WIN_INFO_TAG = 87834,
417 REN_INFO_TAG = 87836,
418 LIGHT_INFO_TAG = 87838,
433 vtkSetMacro(UseBackBuffer,
int);
434 vtkGetMacro(UseBackBuffer,
int);
435 vtkBooleanMacro(UseBackBuffer,
int);
444 vtkSetMacro(SynchronizeTileProperties,
int);
445 vtkGetMacro(SynchronizeTileProperties,
int);
446 vtkBooleanMacro(SynchronizeTileProperties,
int);
478 int ForcedRenderWindowSize[2];
509 int FullImageSize[2];
510 int ReducedImageSize[2];
632 double TileViewport[4];
645 int NumberOfLights = 0;
646 double Viewport[4] = { 0., 0., 0., 0. };
647 double CameraPosition[3] = { 0., 0., 0. };
648 double CameraFocalPoint[3] = { 0., 0., 0. };
649 double CameraViewUp[3] = { 0., 0., 0. };
650 double WindowCenter[2] = { 0., 0. };
651 double CameraClippingRange[2] = { 0., 0. };
652 double CameraViewAngle = 0.;
654 double Background2[3] = { 0., 0., 0. };
655 bool GradientBackground =
false;
657 double ParallelScale = 0.;
670 double FocalPoint[3];
693 #endif // vtkParalleRenderManager_h
virtual void EndRender()
Callbacks that initialize and finish rendering and other tasks.
~vtkParallelRenderManager() override
double ImageReductionFactor
int ObservingRenderWindow
virtual void CollectWindowInformation(vtkMultiProcessStream &)
Subclass should override these methods (instead of SendWindowInformation/ReceiveWindowInformation or ...
RenderWindowInfo()=default
virtual void SetRenderWindow(vtkRenderWindow *renWin)
Set/Get the RenderWindow to use for compositing.
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()
By default, the state of all renderers in the root's render window is propagated to the rest of the p...
void RemoveRenderWindowEventHandlers()
Add/Remove event handlers for the render window.
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
Here is a good place to handle processing of data before and after render.
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)
The most appropriate way to retrieve reduced size image data after a render.
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)
Convenience functions for magnifying images.
an ordered list of renderers
virtual void SendWindowInformation()
Used to synchronize rendering information per frame.
virtual void ComputeVisiblePropBoundsRMI(int renderId)
Callbacks that initialize and finish rendering and other tasks.
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)
Set/Get the vtkMultiProcessController which will handle communications for the parallel rendering.
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)
Callbacks that initialize and finish rendering and other tasks.
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()
Callbacks that initialize and finish rendering and other tasks.
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 *)
By default, the state of all renderers in the root's render window is propagated to the rest of the p...
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 *)
By default, the state of all renderers in the root's render window is propagated to the rest of the p...
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
struct Position_t Position
virtual void ReceiveWindowInformation()
virtual void ResetAllCameras()
Resets the camera of each renderer contained in the RenderWindow.
virtual void SatelliteEndRender()
Callbacks that initialize and finish rendering and other tasks.
virtual void GenericEndRenderCallback()
INTERNAL METHODS (DON NOT USE).
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()
Sets the method used to magnify images.
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)
The most appropriate way to retrieve full size image data after a render.
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()
Sets the method used to magnify images.
virtual void InitializeOffScreen()
Make all rendering windows not viewable set as off screen rendering.
virtual void RenderRMI()
Callbacks that initialize and finish rendering and other tasks.
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)
Convenience functions for magnifying images.
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)
Callbacks that initialize and finish rendering and other tasks.