vtkAMRStreamingVolumeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkAMRStreamingVolumeRepresentation_h
25 #define vtkAMRStreamingVolumeRepresentation_h
26 
27 #include "vtkBoundingBox.h" // needed for vtkBoundingBox.
29 #include "vtkRemotingViewsModule.h" // for export macros
30 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
31 
34 class vtkImageData;
35 class vtkOverlappingAMR;
37 class vtkPVLODVolume;
38 class vtkPVRenderView;
41 class vtkVolumeProperty;
42 class vtkAMRVolumeMapper;
43 
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52  {
53  RESAMPLE_OVER_DATA_BOUNDS = 0,
54  RESAMPLE_USING_VIEW_FRUSTUM = 1
55  };
56 
58 
66  void SetResamplingMode(int val);
67  vtkGetMacro(ResamplingMode, int);
69 
78  vtkInformation* outInfo) override;
79 
84  void SetVisibility(bool val) override;
85 
90  void SetNumberOfSamples(int x, int y, int z);
91 
93 
97  vtkSetClampMacro(StreamingRequestSize, int, 1, 10000);
98  vtkGetMacro(StreamingRequestSize, int);
100 
102 
106  int idx, int port, int connection, int fieldAssociation, const char* name) override;
108  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
109  {
111  idx, port, connection, fieldAssociation, fieldAttributeType);
112  }
113  void SetInputArrayToProcess(int idx, vtkInformation* info) override
114  {
115  this->Superclass::SetInputArrayToProcess(idx, info);
116  }
117  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
118  const char* attributeTypeorName) override
119  {
121  idx, port, connection, fieldAssociation, attributeTypeorName);
122  }
124 
125  //***************************************************************************
126  // Scalar coloring API (forwarded for vtkSmartVolumeMapper.
127 
128  //***************************************************************************
129  // Forwarded to Actor.
130  void SetOrientation(double, double, double);
131  void SetOrigin(double, double, double);
132  void SetPickable(int val);
133  void SetPosition(double, double, double);
134  void SetScale(double, double, double);
135 
136  //***************************************************************************
137  // Forwarded to vtkVolumeProperty.
138  void SetInterpolationType(int val);
139  void SetColor(vtkColorTransferFunction* lut);
140  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
141  void SetScalarOpacityUnitDistance(double val);
142  void SetAmbient(double);
143  void SetDiffuse(double);
144  void SetSpecular(double);
145  void SetSpecularPower(double);
146  void SetShade(bool);
147  void SetIndependantComponents(bool);
148 
149  //***************************************************************************
150  // Forwarded to vtkSmartVolumeMapper.
151  void SetRequestedRenderMode(int);
152 
153 protected:
156 
162  bool AddToView(vtkView* view) override;
163 
169  bool RemoveFromView(vtkView* view) override;
170 
174  int FillInputPortInformation(int port, vtkInformation* info) override;
175 
181  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
182  vtkInformationVector* outputVector) override;
183 
191  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
192  vtkInformationVector* outputVector) override;
193 
200 
202 
206  vtkGetMacro(StreamingCapablePipeline, bool);
208 
210 
213  vtkGetMacro(InStreamingUpdate, bool);
215 
222  bool StreamingUpdate(vtkPVRenderView* view, const double view_planes[24]);
223 
230 
237 
245 
251 
253 
261 
266 
269 
270 private:
272  void operator=(const vtkAMRStreamingVolumeRepresentation&) = delete;
273 
280  bool StreamingCapablePipeline;
281 
289  bool InStreamingUpdate;
290 };
291 
292 #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.