Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (C) 2004-2012 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef VTKVIS_VOLUME_H |
---|
9 | #define 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 "GraphicsObject.h" |
---|
18 | #include "ColorMap.h" |
---|
19 | |
---|
20 | namespace VtkVis { |
---|
21 | |
---|
22 | /** |
---|
23 | * \brief Volume Rendering |
---|
24 | * |
---|
25 | * Currently the DataSet must be image data (3D uniform grid), |
---|
26 | * or an UnstructuredGrid |
---|
27 | */ |
---|
28 | class Volume : public GraphicsObject { |
---|
29 | public: |
---|
30 | enum BlendMode { |
---|
31 | COMPOSITE = 0, |
---|
32 | MAX_INTENSITY, |
---|
33 | MIN_INTENSITY |
---|
34 | }; |
---|
35 | |
---|
36 | Volume(); |
---|
37 | virtual ~Volume(); |
---|
38 | |
---|
39 | virtual const char *getClassName() const |
---|
40 | { |
---|
41 | return "Volume"; |
---|
42 | } |
---|
43 | |
---|
44 | void getSpacing(double spacing[3]); |
---|
45 | |
---|
46 | double getAverageSpacing(); |
---|
47 | |
---|
48 | virtual void setOpacity(double opacity); |
---|
49 | |
---|
50 | virtual void setClippingPlanes(vtkPlaneCollection *planes); |
---|
51 | |
---|
52 | void setColorMap(ColorMap *cmap); |
---|
53 | |
---|
54 | ColorMap *getColorMap(); |
---|
55 | |
---|
56 | void updateColorMap(); |
---|
57 | |
---|
58 | virtual void updateRanges(Renderer *renderer); |
---|
59 | |
---|
60 | void setSampleDistance(float d); |
---|
61 | |
---|
62 | private: |
---|
63 | virtual void initProp(); |
---|
64 | virtual void update(); |
---|
65 | |
---|
66 | ColorMap *_colorMap; |
---|
67 | vtkSmartPointer<vtkAbstractVolumeMapper> _volumeMapper; |
---|
68 | }; |
---|
69 | |
---|
70 | } |
---|
71 | |
---|
72 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.