source: branches/vtkvis_threaded/RpContour3D.h @ 2549

Last change on this file since 2549 was 2459, checked in by ldelgass, 13 years ago

LIC fixes: mask out out-of-bounds sample points from probe filter, run a cutter
before probing to make the probe run faster. A few other misc. cleanups.

  • 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 update();
73
74    int _numContours;
75    std::vector<double> _contours;
76    ColorMap *_colorMap;
77
78    vtkSmartPointer<vtkContourFilter> _contourFilter;
79    vtkSmartPointer<vtkLookupTable> _lut;
80    vtkSmartPointer<vtkPolyDataMapper> _contourMapper;
81};
82
83}
84}
85
86#endif
Note: See TracBrowser for help on using the repository browser.