source: trunk/packages/vizservers/vtkvis/RpContour3D.h @ 2423

Last change on this file since 2423 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.8 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_CONTOUR3D_H__
9#define __RAPPTURE_VTKVIS_CONTOUR3D_H__
10
11#include <vtkSmartPointer.h>
12#include <vtkContourFilter.h>
13#include <vtkLookupTable.h>
14#include <vtkPolyDataMapper.h>
15#include <vtkActor.h>
16#include <vtkPlaneCollection.h>
17
18#include <vector>
19
20#include "ColorMap.h"
21#include "RpVtkGraphicsObject.h"
22
23namespace Rappture {
24namespace VtkVis {
25
26/**
27 * \brief 3D Contour isosurfaces (geometry)
28 */
29class Contour3D : public VtkGraphicsObject {
30public:
31    Contour3D(int numContours);
32
33    Contour3D(const std::vector<double>& contours);
34
35    virtual ~Contour3D();
36
37    virtual const char *getClassName() const
38    {
39        return "Contour3D";
40    }
41
42    virtual void setClippingPlanes(vtkPlaneCollection *planes);
43
44    void setContours(int numContours);
45
46    void setContourList(const std::vector<double>& contours);
47
48    int getNumContours() const;
49
50    const std::vector<double>& getContourList() const;
51
52    void setColorMap(ColorMap *colorMap);
53
54    /**
55     * \brief Return the ColorMap in use
56     */
57    ColorMap *getColorMap()
58    {
59        return _colorMap;
60    }
61
62    void updateColorMap();
63
64    virtual void updateRanges(bool useCumulative,
65                              double scalarRange[2],
66                              double vectorMagnitudeRange[2],
67                              double vectorComponentRange[3][2]);
68
69private:
70    Contour3D();
71
72    virtual void initProp();
73    virtual void update();
74
75    int _numContours;
76    std::vector<double> _contours;
77    ColorMap *_colorMap;
78
79    vtkSmartPointer<vtkContourFilter> _contourFilter;
80    vtkSmartPointer<vtkLookupTable> _lut;
81    vtkSmartPointer<vtkPolyDataMapper> _contourMapper;
82};
83
84}
85}
86
87#endif
Note: See TracBrowser for help on using the repository browser.