source: trunk/packages/vizservers/vtkvis/RpVtkDataSet.h @ 2290

Last change on this file since 2290 was 2290, checked in by ldelgass, 13 years ago
  • Add contour3d (isosurface geometry) command to vtkvis
  • Use depth peeling algorithm (order independent transparency) by default, add 'renderer depthpeel' command to toggle.
  • Use tri strips in some geometry generators for better performance
  • Heightmap: 2D slice resampling of non-image 3D datasets (e.g. points, ugrids) Set a default scaling based on data range. Still some problems where images from resampling have zero values in out-of-bounds pixels (probe filter creates a mask array that could be used). Still need a method/heuristic to select image resolution when resampling.
  • Property svn:eol-style set to native
File size: 1.2 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 setDataFile(const char *filename);
30
31    bool setData(char *data, int nbytes);
32
33    bool setData(vtkDataSetReader *reader);
34
35    bool setData(vtkDataSet *ds);
36
37    vtkDataSet *copyData(vtkDataSet *ds);
38
39    bool is2D() const;
40
41    const std::string& getName() const;
42
43    vtkDataSet *getVtkDataSet();
44
45    const char *getVtkType();
46
47    void getDataRange(double minmax[2]);
48
49    void getBounds(double bounds[6]);
50
51    double getDataValue(double x, double y, double z);
52
53    void setVisibility(bool state);
54
55    bool getVisibility() const;
56
57private:
58    DataSet();
59
60    std::string _name;
61    vtkSmartPointer<vtkDataSet> _dataSet;
62    double _dataRange[2];
63    double _bounds[6];
64    bool _visible;
65};
66
67}
68}
69
70#endif
Note: See TracBrowser for help on using the repository browser.