source: branches/blt4/packages/vizservers/vtkvis/RpContour2D.h @ 2409

Last change on this file since 2409 was 2409, checked in by gah, 13 years ago

update from branch

File size: 1.3 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_CONTOUR2D_H__
9#define __RAPPTURE_VTKVIS_CONTOUR2D_H__
10
11#include <vtkSmartPointer.h>
12#include <vtkContourFilter.h>
13#include <vtkPolyDataMapper.h>
14#include <vtkActor.h>
15#include <vtkPlaneCollection.h>
16
17#include <vector>
18
19#include "RpVtkGraphicsObject.h"
20
21namespace Rappture {
22namespace VtkVis {
23
24/**
25 * \brief 2D Contour lines (isolines)
26 */
27class Contour2D : public VtkGraphicsObject {
28public:
29    Contour2D();
30    virtual ~Contour2D();
31
32    virtual const char *getClassName() const
33    {
34        return "Contour2D";
35    }
36
37    virtual void setDataSet(DataSet *dataset);
38
39    virtual void setClippingPlanes(vtkPlaneCollection *planes);
40
41    void setContours(int numContours);
42
43    void setContours(int numContours, double range[2]);
44
45    void setContourList(const std::vector<double>& contours);
46
47    int getNumContours() const;
48
49    const std::vector<double>& getContourList() const;
50
51private:
52    virtual void initProp();
53    virtual void update();
54
55    int _numContours;
56    std::vector<double> _contours;
57    double _dataRange[2];
58
59    vtkSmartPointer<vtkContourFilter> _contourFilter;
60    vtkSmartPointer<vtkPolyDataMapper> _contourMapper;
61};
62
63}
64}
65
66#endif
Note: See TracBrowser for help on using the repository browser.