source: branches/blt4/packages/vizservers/vtkvis/RpVtkDataSet.h @ 2201

Last change on this file since 2201 was 2201, checked in by gah, 13 years ago
File size: 1.1 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_DATASET_H__
9#define __RAPPTURE_VTKVIS_DATASET_H__
10
11#include <vtkSmartPointer.h>
12#include <vtkDataSet.h>
13#include <vtkDataSetReader.h>
14
15#include <string>
16#include <vector>
17
18namespace Rappture {
19namespace VtkVis {
20
21/**
22 * \brief VTK DataSet wrapper
23 */
24class DataSet {
25public:
26    DataSet(const std::string& name);
27    virtual ~DataSet();
28
29    bool setData(char *data, int nbytes);
30
31    bool setData(vtkDataSet *ds);
32
33    bool setData(vtkDataSetReader *reader);
34
35    bool setDataFile(const char *filename);
36
37    bool is2D() const;
38
39    const std::string& getName() const;
40
41    vtkDataSet *getVtkDataSet();
42
43    void getDataRange(double minmax[2]);
44
45    double getDataValue(double x, double y, double z);
46
47    void setVisibility(bool state);
48
49    bool getVisibility() const;
50
51private:
52    DataSet();
53
54    std::string _name;
55    vtkSmartPointer<vtkDataSet> _dataSet;
56    double _dataRange[2];
57    double _bounds[6];
58    bool _visible;
59};
60
61}
62}
63
64#endif
Note: See TracBrowser for help on using the repository browser.