Coin Logo http://www.sim.no
http://www.coin3d.org

SoTransferFunction.h
1 #ifndef COIN_SOTRANSFERFUNCTION_H
2 #define COIN_SOTRANSFERFUNCTION_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the SIM Voleon visualization library.
7  * Copyright (C) 2003-2004 by Systems in Motion. All rights reserved.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using SIM Voleon with software that can not be combined with
16  * the GNU GPL, and for taking advantage of the additional benefits
17  * of our support services, please contact Systems in Motion about
18  * acquiring a SIM Voleon Professional Edition License.
19  *
20  * See <URL:http://www.coin3d.org/> for more information.
21  *
22  * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23  * <URL:http://www.sim.no/>.
24  *
25 \**************************************************************************/
26 
27 #include <VolumeViz/nodes/SoVolumeRendering.h>
28 #include <Inventor/fields/SoMFFloat.h>
29 #include <Inventor/fields/SoSFEnum.h>
30 #include <Inventor/fields/SoSFInt32.h>
31 #include <Inventor/fields/SoSFUInt32.h>
32 
33 // *************************************************************************
34 
35 class SIMVOLEON_DLL_API SoTransferFunction : public SoVolumeRendering {
37 
38  SO_NODE_HEADER(SoTransferFunction);
39 
40 public:
41  static void initClass(void);
42  SoTransferFunction(void);
43 
45  NONE = 0,
47  GRAY = GREY,
53  SEISMIC
54  };
55 
56  enum ColorMapType {
59  RGBA
60  };
61 
62  SoSFInt32 shift;
63  SoSFInt32 offset;
64  SoSFEnum predefColorMap;
65  SoSFEnum colorMapType;
66  SoMFFloat colorMap;
67 
68  void reMap(int low, int high);
69  SbBool hasTransparency(void) const;
70 
71 protected:
73 
74  virtual void doAction(SoAction * action);
75  virtual void GLRender(SoGLRenderAction * action);
76  virtual void callback(SoCallbackAction * action);
77  virtual void pick(SoPickAction * action);
78 
79 private:
80  // These were added to make it possible to control the narrowing of
81  // the transfer function from the iv-file. They provide the same
82  // functionality as the reMap() function.
83  //
84  // These are "unofficial", private fields, as they are not available
85  // in TGS VolumeViz, which we want to stay compatible with.
86  SoSFUInt32 remapLow;
87  SoSFUInt32 remapHigh;
88 
89  friend class SoTransferFunctionP;
90  class SoTransferFunctionP * pimpl;
91 };
92 
93 // *************************************************************************
94 
95 #endif // !COIN_SOTRANSFERFUNCTION_H

Copyright © 1998-2004 by Systems in Motion AS. All rights reserved.

Generated on Wed Jul 18 2012 20:32:32 for SIMVoleon by Doxygen. 1.8.1.1