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 
91 
95  int idx, int port, int connection, int fieldAssociation, const char* name) override;
97  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
98  {
100  idx, port, connection, fieldAssociation, fieldAttributeType);
101  }
102  void SetInputArrayToProcess(int idx, vtkInformation* info) override
103  {
104  this->Superclass::SetInputArrayToProcess(idx, info);
105  }
106  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
107  const char* attributeTypeorName) override
108  {
110  idx, port, connection, fieldAssociation, attributeTypeorName);
111  }
113 
114  //***************************************************************************
115  // Scalar coloring API (forwarded for vtkSmartVolumeMapper.
116 
117  //***************************************************************************
118  // Forwarded to Actor.
119  void SetOrientation(double, double, double);
120  void SetOrigin(double, double, double);
121  void SetPickable(int val);
122  void SetPosition(double, double, double);
123  void SetScale(double, double, double);
124 
125  //***************************************************************************
126  // Forwarded to vtkVolumeProperty.
127  void SetInterpolationType(int val);
128  void SetColor(vtkColorTransferFunction* lut);
129  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
130  void SetScalarOpacityUnitDistance(double val);
131  void SetAmbient(double);
132  void SetDiffuse(double);
133  void SetSpecular(double);
134  void SetSpecularPower(double);
135  void SetShade(bool);
136  void SetIndependantComponents(bool);
137 
138  //***************************************************************************
139  // Forwarded to vtkSmartVolumeMapper.
140  void SetRequestedRenderMode(int);
141 
142 protected:
145 
151  bool AddToView(vtkView* view) override;
152 
158  bool RemoveFromView(vtkView* view) override;
159 
163  int FillInputPortInformation(int port, vtkInformation* info) override;
164 
170  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
171  vtkInformationVector* outputVector) override;
172 
180  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
181  vtkInformationVector* outputVector) override;
182 
189 
191 
195  vtkGetMacro(StreamingCapablePipeline, bool);
197 
199 
202  vtkGetMacro(InStreamingUpdate, bool);
204 
211  bool StreamingUpdate(vtkPVRenderView* view, const double view_planes[24]);
212 
219 
226 
234 
240 
242 
250 
255 
258 
259 private:
261  void operator=(const vtkAMRStreamingVolumeRepresentation&) = delete;
262 
269  bool StreamingCapablePipeline;
270 
278  bool InStreamingUpdate;
279 };
280 
281 #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.