vtkVolumeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkVolumeRepresentation.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 =========================================================================*/
21 #ifndef vtkVolumeRepresentation_h
22 #define vtkVolumeRepresentation_h
23 
25 
26 #include "vtkNew.h"
27 #include "vtkPVLODVolume.h"
28 #include "vtkRemotingViewsModule.h" //needed for exports
29 #include "vtkSmartPointer.h" //needed for vtkSmartPointer
30 
32 class vtkDataSet;
33 class vtkOutlineSource;
35 class vtkPVLODVolume;
36 class vtkVolumeProperty;
37 
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
48  void SetVisibility(bool val) override;
49 
50  //***************************************************************************
51  // Forwarded to Actor.
52  void SetOrientation(double, double, double);
53  void SetOrigin(double, double, double);
54  void SetPickable(int val);
55  void SetPosition(double, double, double);
56  void SetScale(double, double, double);
57 
58  //***************************************************************************
59  // Forwarded to vtkVolumeProperty and vtkProperty (when applicable).
60  void SetInterpolationType(int val);
61  void SetColor(vtkColorTransferFunction* lut);
62  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
63  void SetScalarOpacityUnitDistance(double val);
64  void SetMapScalars(bool);
65  void SetMultiComponentsMapping(bool);
66 
67  //***************************************************************************
68  // For separate opacity array support
69  void SetUseSeparateOpacityArray(bool);
70  void SelectOpacityArray(int, int, int, int, const char* name);
71  void SelectOpacityArrayComponent(int component);
72 
76  vtkPVLODVolume* GetActor() { return this->Actor; }
77 
78 protected:
80  ~vtkVolumeRepresentation() override;
81 
85 
86  unsigned long DataSize = 0;
87  double DataBounds[6];
88 
89  bool MapScalars = true;
90  bool MultiComponentsMapping = false;
91 
92  bool UseSeparateOpacityArray = false;
93  std::string OpacityArrayName;
94  int OpacityArrayFieldAssociation = -1;
95  int OpacityArrayComponent = -1;
96 
100  bool AppendOpacityComponent(vtkDataSet* dataset);
101 
102 private:
104  void operator=(const vtkVolumeRepresentation&) = delete;
105 };
106 
107 #endif // vtkVolumeRepresentation_h
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
Abstract base class for volume representations.
an actor that supports multiple levels of detail
vtkNew< vtkOutlineSource > OutlineSource
vtkNew< vtkVolumeProperty > Property
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSmartPointer< vtkPVLODVolume > Actor
vtkPVLODVolume * GetActor()
Provides access to the actor used by this representation.