ParaView
vtkImageVolumeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkImageVolumeRepresentation.h
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 =========================================================================*/
27 #ifndef vtkImageVolumeRepresentation_h
28 #define vtkImageVolumeRepresentation_h
29 
30 #include "vtkNew.h" // needed for vtkNew.
31 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
33 
34 class vtkColorTransferFunction;
35 class vtkExtentTranslator;
36 class vtkFixedPointVolumeRayCastMapper;
37 class vtkImageData;
38 class vtkOutlineSource;
40 class vtkPiecewiseFunction;
41 class vtkPolyDataMapper;
42 class vtkPVCacheKeeper;
43 class vtkPVLODVolume;
44 class vtkSmartVolumeMapper;
45 class vtkVolumeProperty;
46 
47 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkImageVolumeRepresentation
49 {
50 public:
51  static vtkImageVolumeRepresentation* New();
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
61  virtual int ProcessViewRequest(
62  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
63 
70  virtual void MarkModified();
71 
76  virtual void SetVisibility(bool val);
77 
78  //***************************************************************************
79  // Forwarded to Actor.
80  void SetOrientation(double, double, double);
81  void SetOrigin(double, double, double);
82  void SetPickable(int val);
83  void SetPosition(double, double, double);
84  void SetScale(double, double, double);
85 
86  //***************************************************************************
87  // Forwarded to vtkVolumeProperty.
88  void SetInterpolationType(int val);
89  void SetColor(vtkColorTransferFunction* lut);
90  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
91  void SetScalarOpacityUnitDistance(double val);
92  void SetAmbient(double);
93  void SetDiffuse(double);
94  void SetSpecular(double);
95  void SetSpecularPower(double);
96  void SetShade(bool);
97  void SetIndependantComponents(bool);
98 
99  //***************************************************************************
100  // Forwarded to vtkSmartVolumeMapper.
101  void SetRequestedRenderMode(int);
102 
106  vtkPVLODVolume* GetActor() { return this->Actor; }
107 
112  VTK_LEGACY(static void PassOrderedCompositingInformation(
113  vtkPVDataRepresentation* self, vtkInformation* inInfo));
114 
115 protected:
118 
122  virtual int FillInputPortInformation(int port, vtkInformation* info);
123 
124  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
125 
131  virtual bool AddToView(vtkView* view);
132 
138  virtual bool RemoveFromView(vtkView* view);
139 
143  virtual bool IsCached(double cache_key);
144 
148  virtual void UpdateMapperParameters();
149 
153  virtual vtkPVLODVolume* GetRenderedProp() { return this->Actor; };
154 
155  vtkImageData* Cache;
157  vtkSmartVolumeMapper* VolumeMapper;
158  vtkVolumeProperty* Property;
160 
161  vtkOutlineSource* OutlineSource;
162  vtkPolyDataMapper* OutlineMapper;
163  ;
164 
165  unsigned long DataSize;
166  double DataBounds[6];
167 
168  // meta-data about the input image to pass on to render view for hints
169  // when redistributing data.
170  vtkNew<vtkPExtentTranslator> PExtentTranslator;
171  double Origin[3];
172  double Spacing[3];
173  int WholeExtent[6];
174 
175 private:
177  void operator=(const vtkImageVolumeRepresentation&) VTK_DELETE_FUNCTION;
178 };
179 
180 #endif
virtual vtkPVLODVolume * GetRenderedProp()
Used in ConvertSelection to locate the rendered prop.
void PrintSelf(ostream &os, vtkIndent indent)
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkNew< vtkPExtentTranslator > PExtentTranslator
an actor that supports multiple levels of detail
extent translator that collects information about extents from multiple processes in parallel...
virtual void MarkModified()
This is one of the most important functions.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
manages data cache for flip book animations.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.
representation for showing image datasets as a volume.
vtkPVLODVolume * GetActor()
Provides access to the actor used by this representation.