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 VTKVIS_LIC_H |
---|
9 | #define VTKVIS_LIC_H |
---|
10 | |
---|
11 | #include <vtkSmartPointer.h> |
---|
12 | #include <vtkProp.h> |
---|
13 | #include <vtkPlaneCollection.h> |
---|
14 | #include <vtkExtractVOI.h> |
---|
15 | #include <vtkProbeFilter.h> |
---|
16 | #include <vtkImageDataLIC2D.h> |
---|
17 | #include <vtkSurfaceLICPainter.h> |
---|
18 | #include <vtkMapper.h> |
---|
19 | #include <vtkLookupTable.h> |
---|
20 | #include <vtkPlane.h> |
---|
21 | |
---|
22 | #include "ColorMap.h" |
---|
23 | #include "Types.h" |
---|
24 | #include "GraphicsObject.h" |
---|
25 | |
---|
26 | namespace VtkVis { |
---|
27 | |
---|
28 | /** |
---|
29 | * \brief Line Integral Convolution visualization of vector fields |
---|
30 | * |
---|
31 | * The DataSet must contain vectors |
---|
32 | */ |
---|
33 | class LIC : public GraphicsObject { |
---|
34 | public: |
---|
35 | LIC(); |
---|
36 | virtual ~LIC(); |
---|
37 | |
---|
38 | virtual const char *getClassName() const |
---|
39 | { |
---|
40 | return "LIC"; |
---|
41 | } |
---|
42 | |
---|
43 | virtual void setClippingPlanes(vtkPlaneCollection *planes); |
---|
44 | |
---|
45 | void selectVolumeSlice(Axis axis, double ratio); |
---|
46 | |
---|
47 | void setInterpolateBeforeMapping(bool state); |
---|
48 | |
---|
49 | void setColorMap(ColorMap *colorMap); |
---|
50 | |
---|
51 | /** |
---|
52 | * \brief Return the ColorMap in use |
---|
53 | */ |
---|
54 | ColorMap *getColorMap() |
---|
55 | { |
---|
56 | return _colorMap; |
---|
57 | } |
---|
58 | |
---|
59 | void updateColorMap(); |
---|
60 | |
---|
61 | virtual void updateRanges(Renderer *renderer); |
---|
62 | |
---|
63 | private: |
---|
64 | virtual void initProp(); |
---|
65 | virtual void update(); |
---|
66 | |
---|
67 | Axis _sliceAxis; |
---|
68 | ColorMap *_colorMap; |
---|
69 | |
---|
70 | vtkSmartPointer<vtkLookupTable> _lut; |
---|
71 | vtkSmartPointer<vtkExtractVOI> _volumeSlicer; |
---|
72 | vtkSmartPointer<vtkProbeFilter> _probeFilter; |
---|
73 | vtkSmartPointer<vtkPlane> _cutPlane; |
---|
74 | vtkSmartPointer<vtkImageDataLIC2D> _lic; |
---|
75 | vtkSmartPointer<vtkSurfaceLICPainter> _painter; |
---|
76 | vtkSmartPointer<vtkMapper> _mapper; |
---|
77 | }; |
---|
78 | |
---|
79 | } |
---|
80 | |
---|
81 | #endif |
---|