ParaView
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 "vtkSmartPointer.h" // needed for vtkSmartPointer.
30 
32 class vtkColorTransferFunction;
33 class vtkImageData;
34 class vtkOverlappingAMR;
35 class vtkPiecewiseFunction;
36 class vtkPVLODVolume;
37 class vtkPVRenderView;
39 class vtkSmartVolumeMapper;
40 class vtkVolumeProperty;
41 
42 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkAMRStreamingVolumeRepresentation
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51  {
52  RESAMPLE_OVER_DATA_BOUNDS = 0,
53  RESAMPLE_USING_VIEW_FRUSTUM = 1
54  };
55 
57 
65  void SetResamplingMode(int val);
66  vtkGetMacro(ResamplingMode, int);
68 
76  virtual int ProcessViewRequest(
77  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
78 
83  virtual void SetVisibility(bool val);
84 
89  void SetNumberOfSamples(int x, int y, int z);
90 
92 
96  vtkSetClampMacro(StreamingRequestSize, int, 1, 10000);
97  vtkGetMacro(StreamingRequestSize, int);
99 
101 
104  virtual void SetInputArrayToProcess(
105  int idx, int port, int connection, int fieldAssociation, const char* name);
107  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
108  {
109  this->Superclass::SetInputArrayToProcess(
110  idx, port, connection, fieldAssociation, fieldAttributeType);
111  }
112  virtual void SetInputArrayToProcess(int idx, vtkInformation* info)
113  {
114  this->Superclass::SetInputArrayToProcess(idx, info);
115  }
116  virtual void SetInputArrayToProcess(int idx, int port, int connection,
117  const char* fieldAssociation, const char* attributeTypeorName)
118  {
119  this->Superclass::SetInputArrayToProcess(
120  idx, port, connection, fieldAssociation, attributeTypeorName);
121  }
123 
124  //***************************************************************************
125  // Scalar coloring API (forwarded for vtkSmartVolumeMapper.
126 
127  //***************************************************************************
128  // Forwarded to Actor.
129  void SetOrientation(double, double, double);
130  void SetOrigin(double, double, double);
131  void SetPickable(int val);
132  void SetPosition(double, double, double);
133  void SetScale(double, double, double);
134 
135  //***************************************************************************
136  // Forwarded to vtkVolumeProperty.
137  void SetInterpolationType(int val);
138  void SetColor(vtkColorTransferFunction* lut);
139  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
140  void SetScalarOpacityUnitDistance(double val);
141  void SetAmbient(double);
142  void SetDiffuse(double);
143  void SetSpecular(double);
144  void SetSpecularPower(double);
145  void SetShade(bool);
146  void SetIndependantComponents(bool);
147 
148  //***************************************************************************
149  // Forwarded to vtkSmartVolumeMapper.
150  void SetRequestedRenderMode(int);
151 
152 protected:
155 
161  virtual bool AddToView(vtkView* view);
162 
168  virtual bool RemoveFromView(vtkView* view);
169 
173  virtual int FillInputPortInformation(int port, vtkInformation* info);
174 
180  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
181  vtkInformationVector* outputVector);
182 
190  virtual int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
191  vtkInformationVector* outputVector);
192 
198  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
199 
201 
205  vtkGetMacro(StreamingCapablePipeline, bool);
207 
209 
212  vtkGetMacro(InStreamingUpdate, bool);
214 
221  bool StreamingUpdate(vtkPVRenderView* view, const double view_planes[24]);
222 
228  vtkSmartPointer<vtkDataObject> ProcessedData;
229 
235  vtkSmartPointer<vtkDataObject> ProcessedPiece;
236 
243  vtkSmartPointer<vtkAMRStreamingPriorityQueue> PriorityQueue;
244 
249  vtkSmartPointer<vtkResampledAMRImageSource> Resampler;
250 
252 
255  vtkSmartPointer<vtkSmartVolumeMapper> VolumeMapper;
256  vtkSmartPointer<vtkVolumeProperty> Property;
257  vtkSmartPointer<vtkPVLODVolume> Actor;
259 
263  vtkBoundingBox DataBounds;
264 
267 
268 private:
270  const vtkAMRStreamingVolumeRepresentation&) VTK_DELETE_FUNCTION;
271  void operator=(const vtkAMRStreamingVolumeRepresentation&) VTK_DELETE_FUNCTION;
272 
279  bool StreamingCapablePipeline;
280 
288  bool InStreamingUpdate;
289 };
290 
291 #endif
void PrintSelf(ostream &os, vtkIndent indent)
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.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
Set the input data arrays that this algorithm will process.
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.
vtkSmartPointer< vtkDataObject > ProcessedPiece
This is the data object generated processed by the most recent call to RequestData() while streaming...
virtual void SetInputArrayToProcess(int idx, vtkInformation *info)
Set the input data arrays that this algorithm will process.
virtual int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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.
virtual bool AddToView(vtkView *view)
Making these methods public.
vtkSmartPointer< vtkSmartVolumeMapper > VolumeMapper
Rendering components.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkSmartPointer< vtkDataObject > ProcessedData
This is the data object generated processed by the most recent call to RequestData() while not stream...
an actor that supports multiple levels of detail
vtkSmartPointer< vtkVolumeProperty > Property
Rendering components.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
vtkSmartPointer< vtkPVLODVolume > Actor
Rendering components.
virtual void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
Set the input data arrays that this algorithm will process.
implements a coverage based priority queue for vtkOverlappingAMR dataset.
Render View for ParaView.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkBoundingBox DataBounds
Used to keep track of data bounds.