source: branches/Rappture 1.2/packages/vizservers/vtkvis/RpContour3D.h @ 3208

Last change on this file since 3208 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

  • Property svn:eol-style set to native
File size: 1.6 KB
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 __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(Renderer *renderer);
65
66private:
67    Contour3D();
68
69    virtual void update();
70
71    int _numContours;
72    std::vector<double> _contours;
73    ColorMap *_colorMap;
74
75    vtkSmartPointer<vtkContourFilter> _contourFilter;
76    vtkSmartPointer<vtkLookupTable> _lut;
77    vtkSmartPointer<vtkPolyDataMapper> _contourMapper;
78};
79
80}
81}
82
83#endif
Note: See TracBrowser for help on using the repository browser.