44 #ifndef vtkParallelRenderManager_h 45 #define vtkParallelRenderManager_h 48 #include "vtkRenderingParallelModule.h" 104 virtual void InitializePieces();
113 virtual void InitializeOffScreen();
121 virtual void StartInteractor();
127 virtual void StartServices();
132 virtual void StopServices();
138 virtual void StartRender();
139 virtual void EndRender();
140 virtual void SatelliteStartRender();
141 virtual void SatelliteEndRender();
142 virtual void RenderRMI();
144 virtual void ResetCameraClippingRange(
vtkRenderer* ren);
145 virtual void ComputeVisiblePropBoundsRMI(
int renderId);
148 virtual void InitializeRMIs();
155 virtual void ResetAllCameras();
160 virtual void ComputeVisiblePropBounds(
vtkRenderer* ren,
double bounds[6]);
169 vtkSetMacro(ParallelRendering,
int);
170 vtkGetMacro(ParallelRendering,
int);
171 vtkBooleanMacro(ParallelRendering,
int);
181 vtkSetMacro(RenderEventPropagation,
int);
182 vtkGetMacro(RenderEventPropagation,
int);
183 vtkBooleanMacro(RenderEventPropagation,
int);
206 vtkSetMacro(UseCompositing,
int);
207 vtkGetMacro(UseCompositing,
int);
208 vtkBooleanMacro(UseCompositing,
int);
225 virtual void SetImageReductionFactor(
double factor);
226 vtkGetMacro(ImageReductionFactor,
double);
229 vtkSetMacro(MaxImageReductionFactor,
double);
230 vtkGetMacro(MaxImageReductionFactor,
double);
238 virtual void SetImageReductionFactorForUpdateRate(
double DesiredUpdateRate);
246 vtkSetMacro(AutoImageReductionFactor,
int);
247 vtkGetMacro(AutoImageReductionFactor,
int);
248 vtkBooleanMacro(AutoImageReductionFactor,
int);
255 vtkGetMacro(RenderTime,
double);
256 vtkGetMacro(ImageProcessingTime,
double);
269 vtkGetMacro(SyncRenderWindowRenderers,
int);
270 vtkSetMacro(SyncRenderWindowRenderers,
int);
271 vtkBooleanMacro(SyncRenderWindowRenderers,
int);
274 virtual void RemoveAllRenderers();
287 vtkSetMacro(WriteBackImages,
int);
288 vtkGetMacro(WriteBackImages,
int);
289 vtkBooleanMacro(WriteBackImages,
int);
298 vtkSetMacro(MagnifyImages,
int);
299 vtkGetMacro(MagnifyImages,
int);
300 vtkBooleanMacro(MagnifyImages,
int);
315 virtual void SetMagnifyImageMethod(
int method);
316 vtkGetMacro(MagnifyImageMethod,
int);
327 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
330 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
333 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
364 vtkGetVector2Macro(FullImageSize,
int);
370 vtkGetVector2Macro(ReducedImageSize,
int);
377 void TileWindows(
int xsize,
int ysize,
int nColumns);
384 vtkSetMacro(UseRGBA,
int);
385 vtkGetMacro(UseRGBA,
int);
393 vtkSetMacro(ForceRenderWindowSize,
int);
394 vtkGetMacro(ForceRenderWindowSize,
int);
402 vtkSetVector2Macro(ForcedRenderWindowSize,
int);
403 vtkGetVector2Macro(ForcedRenderWindowSize,
int);
408 RENDER_RMI_TAG = 34532,
409 COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG = 54636,
410 WIN_INFO_TAG = 87834,
411 REN_INFO_TAG = 87836,
412 LIGHT_INFO_TAG = 87838,
427 vtkSetMacro(UseBackBuffer,
int);
428 vtkGetMacro(UseBackBuffer,
int);
429 vtkBooleanMacro(UseBackBuffer,
int);
438 vtkSetMacro(SynchronizeTileProperties,
int);
439 vtkGetMacro(SynchronizeTileProperties,
int);
440 vtkBooleanMacro(SynchronizeTileProperties,
int);
449 virtual void GenericStartRenderCallback();
450 virtual void GenericEndRenderCallback();
461 void AddRenderWindowEventHandlers();
462 void RemoveRenderWindowEventHandlers();
472 int ForcedRenderWindowSize[2];
503 int FullImageSize[2];
504 int ReducedImageSize[2];
561 virtual void PreRenderProcessing() = 0;
562 virtual void PostRenderProcessing() = 0;
569 virtual void SetRenderWindowSize();
576 virtual void LocalComputeVisiblePropBounds(
vtkRenderer* ren,
double bounds[6]);
581 virtual void MagnifyReducedImage();
586 virtual void WriteFullImage();
591 virtual void ReadReducedImage();
597 virtual int LastRenderInFrontBuffer();
602 virtual int ChooseBuffer();
607 virtual void SetRenderWindowPixelData(
vtkUnsignedCharArray* pixels,
const int pixelDimensions[2]);
626 double TileViewport[4];
641 double CameraPosition[3];
642 double CameraFocalPoint[3];
643 double CameraViewUp[3];
644 double WindowCenter[2];
645 double CameraClippingRange[2];
648 double Background2[3];
664 double FocalPoint[3];
687 #endif // vtkParalleRenderManager_h
vtkUnsignedCharArray * FullImage
virtual bool ProcessWindowInformation(vtkMultiProcessStream &)
vtkMultiProcessController * Controller
virtual bool ProcessRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
abstract base class for most VTK objects
virtual int CheckForAbortComposite()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
stream used to pass data across processes using vtkMultiProcessController.
vtkUnsignedCharArray * ReducedImage
An object to control parallel rendering.
int RenderWindowImageUpToDate
unsigned long EndRenderTag
unsigned long BoundsRMIId
int SyncRenderWindowRenderers
unsigned long StartRenderTag
double AverageTimePerPixel
Used by SetImageReductionFactorForUpdateRate to smooth transitions transitions between image reductio...
abstract specification for renderers
virtual void SendRendererInformation(vtkRenderer *)
static void SetDefaultRenderEventPropagation(bool val)
Get/Set the default value used for RenderEventPropagation when a new instance of vtkParallelRenderMan...
void SetMagnifyImageMethodToNearest()
Sets the method used to magnify images.
unsigned long AbortRenderCheckTag
double ImageReductionFactor
vtkDoubleArray * Viewports
dynamic, self-adjusting array of double
Timer support and logging.
int ObservingRenderWindow
an ordered list of renderers
virtual void CollectWindowInformation(vtkMultiProcessStream &)
Subclass should override these methods (instead of SendWindowInformation/ReceiveWindowInformation or ...
a simple class to control print indentation
double ImageProcessingTime
int ForceRenderWindowSize
vtkRenderWindow * RenderWindow
virtual void ReceiveRendererInformation(vtkRenderer *)
virtual void CheckForAbortRender()
virtual void ReceiveWindowInformation()
dynamic, self-adjusting array of unsigned char
static bool GetDefaultRenderEventPropagation()
create a window for renderers to draw into
virtual void SendWindowInformation()
Used to synchronize rendering information per frame.
int RootProcessId
The "root" node's process id.
unsigned long RenderRMIId
int AutoImageReductionFactor
unsigned long ResetCameraClippingRangeTag
double MaxImageReductionFactor
void SetMagnifyImageMethodToLinear()
Sets the method used to magnify images.
unsigned long ResetCameraTag
static bool DefaultRenderEventPropagation
int SynchronizeTileProperties
vtkRendererCollection * Renderers
int RenderEventPropagation
virtual void CollectRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
virtual int ImageReduceRenderer(vtkRenderer *)
Returns true if the image for the given renderer should be rendered at a reduced size to be magnified...
Multiprocessing communication superclass.
double ImageReductionFactor