Last change
on this file since 2612 was
2612,
checked in by ldelgass, 13 years ago
|
Refactor vtkvis to support setting colormap fields by name/attribute type
rather than always using active scalars/vectors. Also convert common
graphics objects set methods in Renderer to template methods and separate
core and graphics object related methods to separate files.
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (C) 2011, Purdue Research Foundation |
---|
4 | * |
---|
5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef __RAPPTURE_VTKVIS_VOLUME_H__ |
---|
9 | #define __RAPPTURE_VTKVIS_VOLUME_H__ |
---|
10 | |
---|
11 | #include <vtkSmartPointer.h> |
---|
12 | #include <vtkProp.h> |
---|
13 | #include <vtkVolume.h> |
---|
14 | #include <vtkAbstractVolumeMapper.h> |
---|
15 | #include <vtkPlaneCollection.h> |
---|
16 | |
---|
17 | #include "RpVtkGraphicsObject.h" |
---|
18 | #include "ColorMap.h" |
---|
19 | |
---|
20 | namespace Rappture { |
---|
21 | namespace VtkVis { |
---|
22 | |
---|
23 | /** |
---|
24 | * \brief Volume Rendering |
---|
25 | * |
---|
26 | * Currently the DataSet must be image data (3D uniform grid), |
---|
27 | * or an UnstructuredGrid |
---|
28 | */ |
---|
29 | class Volume : public VtkGraphicsObject { |
---|
30 | public: |
---|
31 | enum BlendMode { |
---|
32 | COMPOSITE = 0, |
---|
33 | MAX_INTENSITY, |
---|
34 | MIN_INTENSITY |
---|
35 | }; |
---|
36 | |
---|
37 | Volume(); |
---|
38 | virtual ~Volume(); |
---|
39 | |
---|
40 | virtual const char *getClassName() const |
---|
41 | { |
---|
42 | return "Volume"; |
---|
43 | } |
---|
44 | |
---|
45 | virtual void setOpacity(double opacity); |
---|
46 | |
---|
47 | virtual void setClippingPlanes(vtkPlaneCollection *planes); |
---|
48 | |
---|
49 | void setColorMap(ColorMap *cmap); |
---|
50 | |
---|
51 | ColorMap *getColorMap(); |
---|
52 | |
---|
53 | void updateColorMap(); |
---|
54 | |
---|
55 | virtual void updateRanges(Renderer *renderer); |
---|
56 | |
---|
57 | private: |
---|
58 | virtual void initProp(); |
---|
59 | virtual void update(); |
---|
60 | |
---|
61 | ColorMap *_colorMap; |
---|
62 | vtkSmartPointer<vtkAbstractVolumeMapper> _volumeMapper; |
---|
63 | }; |
---|
64 | |
---|
65 | } |
---|
66 | } |
---|
67 | |
---|
68 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.