vtkAMRStreamingVolumeRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkAMRStreamingVolumeRepresentation_h
13 #define vtkAMRStreamingVolumeRepresentation_h
14 
15 #include "vtkBoundingBox.h" // needed for vtkBoundingBox.
17 #include "vtkRemotingViewsModule.h" // for export macros
18 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
19 
22 class vtkImageData;
23 class vtkOverlappingAMR;
25 class vtkPVLODVolume;
26 class vtkPVRenderView;
29 class vtkVolumeProperty;
30 class vtkAMRVolumeMapper;
31 
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40  {
41  RESAMPLE_OVER_DATA_BOUNDS = 0,
42  RESAMPLE_USING_VIEW_FRUSTUM = 1
43  };
44 
46 
54  void SetResamplingMode(int val);
55  vtkGetMacro(ResamplingMode, int);
57 
66  vtkInformation* outInfo) override;
67 
72  void SetVisibility(bool val) override;
73 
78  void SetNumberOfSamples(int x, int y, int z);
79 
81 
85  vtkSetClampMacro(StreamingRequestSize, int, 1, 10000);
86  vtkGetMacro(StreamingRequestSize, int);
88 
90 
94  int idx, int port, int connection, int fieldAssociation, const char* name) override;
96  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
97  {
99  idx, port, connection, fieldAssociation, fieldAttributeType);
100  }
101  void SetInputArrayToProcess(int idx, vtkInformation* info) override
102  {
103  this->Superclass::SetInputArrayToProcess(idx, info);
104  }
105  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
106  const char* attributeTypeorName) override
107  {
109  idx, port, connection, fieldAssociation, attributeTypeorName);
110  }
112 
113  //***************************************************************************
114  // Scalar coloring API (forwarded for vtkSmartVolumeMapper.
115 
116  //***************************************************************************
117  // Forwarded to Actor.
118  void SetOrientation(double, double, double);
119  void SetOrigin(double, double, double);
120  void SetPickable(int val);
121  void SetPosition(double, double, double);
122  void SetScale(double, double, double);
123 
124  //***************************************************************************
125  // Forwarded to vtkVolumeProperty.
126  void SetInterpolationType(int val);
127  void SetColor(vtkColorTransferFunction* lut);
128  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
129  void SetScalarOpacityUnitDistance(double val);
130  void SetAmbient(double);
131  void SetDiffuse(double);
132  void SetSpecular(double);
133  void SetSpecularPower(double);
134  void SetShade(bool);
135  void SetIndependantComponents(bool);
136 
137  //***************************************************************************
138  // Forwarded to vtkSmartVolumeMapper.
139  void SetRequestedRenderMode(int);
140 
141 protected:
144 
150  bool AddToView(vtkView* view) override;
151 
157  bool RemoveFromView(vtkView* view) override;
158 
162  int FillInputPortInformation(int port, vtkInformation* info) override;
163 
169  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
170  vtkInformationVector* outputVector) override;
171 
179  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
180  vtkInformationVector* outputVector) override;
181 
188 
190 
194  vtkGetMacro(StreamingCapablePipeline, bool);
196 
198 
201  vtkGetMacro(InStreamingUpdate, bool);
203 
210  bool StreamingUpdate(vtkPVRenderView* view, const double view_planes[24]);
211 
218 
225 
233 
239 
241 
249 
254 
257 
258 private:
260  void operator=(const vtkAMRStreamingVolumeRepresentation&) = delete;
261 
268  bool StreamingCapablePipeline;
269 
277  bool InStreamingUpdate;
278 };
279 
280 #endif
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define VTKREMOTINGVIEWS_EXPORT
vtkSmartPointer< vtkAMRStreamingPriorityQueue > PriorityQueue
vtkAMRStreamingPriorityQueue is a helper class we used to compute the order in which to request block...
vtkPVDataRepresentation adds some ParaView specific API to data representations.
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
image data source that resamples an AMR dataset to produce the image data.
representation used for volume rendering AMR datasets with ability to stream blocks.
void SetInputArrayToProcess(int idx, vtkInformation *info) override
Set the input data arrays that this algorithm will process.
vtkSmartPointer< vtkDataObject > ProcessedPiece
This is the data object generated processed by the most recent call to RequestData() while streaming...
bool AddToView(vtkView *view) override
Making these methods public.
info
vtkSmartPointer< vtkResampledAMRImageSource > Resampler
vtkImageData source used to resample an AMR dataset into a uniform grid suitable for volume rendering...
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
vtkSmartPointer< vtkSmartVolumeMapper > VolumeMapper
Rendering components.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkSmartPointer< vtkDataObject > ProcessedData
This is the data object generated processed by the most recent call to RequestData() while not stream...
void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName) override
Set the input data arrays that this algorithm will process.
an actor that supports multiple levels of detail
vtkSmartPointer< vtkVolumeProperty > Property
Rendering components.
bool RemoveFromView(vtkView *view) override
Making these methods public.
void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
Set the input data arrays that this algorithm will process.
static vtkDataRepresentation * New()
vtkSmartPointer< vtkPVLODVolume > Actor
Rendering components.
void PrintSelf(ostream &os, vtkIndent indent) override
implements a coverage based priority queue for vtkOverlappingAMR dataset.
port
Render View for ParaView.
vtkBoundingBox DataBounds
Used to keep track of data bounds.
vtkSmartPointer< vtkAMRVolumeMapper > AMRVolumeMapper
Rendering components.