source: branches/vtkvis_threaded/RpVolume.h @ 2495

Last change on this file since 2495 was 2402, checked in by ldelgass, 13 years ago
  • Let graphics objects handle DataSet? cumulative range changes, track vectors as well as scalars, also supply cumulative ranges in setDataSet()
  • Be more consistent about naming enums and commands for vectors
  • Add constructor arguments to some graphics objects to speed initialization (eliminates some pipeline changes)
  • Apply a scale factor to glyphs based on cell sizes
  • Add line glyph shape
  • Don't delete ColorMaps? in use
  • Update graphics objects when a ColorMap? is edited
  • Property svn:eol-style set to native
File size: 1.5 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    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(bool useCumulative,
56                              double scalarRange[2],
57                              double vectorMagnitudeRange[2],
58                              double vectorComponentRange[3][2]);
59
60private:
61    virtual void initProp();
62    virtual void update();
63
64    ColorMap *_colorMap;
65    vtkSmartPointer<vtkAbstractVolumeMapper> _volumeMapper;
66};
67
68}
69}
70
71#endif
Note: See TracBrowser for help on using the repository browser.