source: trunk/packages/vizservers/vtkvis/RpVolume.h @ 3142

Last change on this file since 3142 was 2757, checked in by ldelgass, 13 years ago

Add volume quality command to adjust relative sampling distance (quality is in
[0,1] range and is used to adjust sample distance relative to volume spacing.
Also first pass at supporting point cloud input to volume renderer.

  • Property svn:eol-style set to native
File size: 1.4 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
20namespace Rappture {
21namespace VtkVis {
22
23/**
24 * \brief Volume Rendering
25 *
26 * Currently the DataSet must be image data (3D uniform grid),
27 * or an UnstructuredGrid
28 */
29class Volume : public VtkGraphicsObject {
30public:
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    void getSpacing(double spacing[3]);
46
47    double getAverageSpacing();
48
49    virtual void setOpacity(double opacity);
50
51    virtual void setClippingPlanes(vtkPlaneCollection *planes);
52
53    void setColorMap(ColorMap *cmap);
54
55    ColorMap *getColorMap();
56
57    void updateColorMap();
58
59    virtual void updateRanges(Renderer *renderer);
60
61    void setSampleDistance(float d);
62
63private:
64    virtual void initProp();
65    virtual void update();
66
67    ColorMap *_colorMap;
68    vtkSmartPointer<vtkAbstractVolumeMapper> _volumeMapper;
69};
70
71}
72}
73
74#endif
Note: See TracBrowser for help on using the repository browser.