Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoColorMap.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : R. ALBOU (Jan 2005)
22**=======================================================================*/
23
24#ifndef _SO_COLOR_MAP_
25#define _SO_COLOR_MAP_
26
27#include <Inventor/nodes/SoNode.h>
28#include <Inventor/fields/SoSFFloat.h>
29#include <Inventor/fields/SoMFFloat.h>
30#include <Inventor/fields/SoSFEnum.h>
31#include <Inventor/SbPImpl.h>
32
33#ifdef _MSC_VER
34#pragma warning( push )
35#pragma warning(disable:4251)
36#endif
37
38SO_PIMPL_BASE_PUBLIC_DECLARATION(SoColorMap)
39
40
138class SoColorMap : public SoNode {
139 SO_NODE_HEADER(SoColorMap) ;
140
141 SO_PIMPL_BASE_PUBLIC_HEADER(SoColorMap)
142
143 public:
150
153
156
158 RGB_ALPHA
159 } ;
160
196
216
221
250
272
281
287 {
291 LINEAR
292 };
293
303
308
313 unsigned int getNumColor() const;
314
320
321private:
322 virtual void doAction(SoAction *action);
323 virtual void GLRender(SoGLRenderAction *action) ;
324 virtual void callback( SoCallbackAction* action );
325
326/*----------------------------------------------------------------------------*/
327
328private:
329
330 static void initClass();
331 static void exitClass();
332
336 virtual void notify(SoNotList *list);
337
338 //bind fragment and texture object
339 void enableFragment(SoState* state, SbBool enable);
340 //do the teximage or colortable for the palette
341 void installGLColorMap(SoState* state) ;
342
343 //Remap the defined color map between min and max indices
344 //minType and maxType are respectively the minimum value and
345 //the maximum value of the datatype
346 void reMap(float minType, float maxType, SbBool forceUpdate = FALSE);
347
348 // Returns the packed color map
349 unsigned int* getPackedColorMap() const;
350
355 virtual bool affectsPath() const;
356
357private:
358
362 virtual ~SoColorMap();
363
364private :
365
366 // Function to factorise constructors code
367 void construct();
368
369} ;
370/*----------------------------------------------------------------------------*/
371
372#ifdef _MSC_VER
373#pragma warning( pop )
374#endif
375
376#endif /* _SO_COLOR_MAP_ */
377
378
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for indexe...
Definition SoColorMap.h:138
SoSFEnum colorMapFormat
Indicates the format of the color map (number of color components).
Definition SoColorMap.h:271
SoColorMap()
Constructor.
ColorMapFormat
Color map format.
Definition SoColorMap.h:145
@ LUMINANCE_ALPHA
(2 floats)
Definition SoColorMap.h:152
@ ALPHA
(1 float)
Definition SoColorMap.h:149
@ RGB
(3 floats)
Definition SoColorMap.h:155
@ LUMINANCE
(1 float)
Definition SoColorMap.h:147
SoSFFloat max
See min.
Definition SoColorMap.h:220
unsigned int getNumColor() const
This convenience method returns the number of colors in the color map (ie: colorMap....
SoSFFloat min
This field allow to remap the color map such that only data values ranging from min to max will b...
Definition SoColorMap.h:215
SbBool hasTransparency() const
Returns TRUE if the current color map contains alpha values less than 1.
SoSFEnum interpolation
The colormap interpolation type.
Definition SoColorMap.h:302
SoSFEnum predefinedColorMap
Use this field to load predefined color maps.
Definition SoColorMap.h:249
PredefinedColorMap
Predefined color map.
Definition SoColorMap.h:162
@ VOLREN_GREEN
VolRenGreen.
Definition SoColorMap.h:188
@ STANDARD
Standard.
Definition SoColorMap.h:172
@ NONE
None.
Definition SoColorMap.h:164
@ BLUE_WHITE_RED
Blue white red.
Definition SoColorMap.h:180
@ INTENSITY
Intensity.
Definition SoColorMap.h:182
@ SEISMIC
Seismic.
Definition SoColorMap.h:178
@ AIRWAY
Airway.
Definition SoColorMap.h:190
@ LABEL_256
256 labels
Definition SoColorMap.h:184
@ GRAY
Gray (Default)
Definition SoColorMap.h:166
@ PHYSICS
Physics.
Definition SoColorMap.h:170
@ AIRWAY_SURFACES
Airway surfaces.
Definition SoColorMap.h:192
@ TEMPERATURE
Temperature.
Definition SoColorMap.h:168
@ GLOW
Glow.
Definition SoColorMap.h:174
@ BLUE_RED
Blue red.
Definition SoColorMap.h:176
@ VOLREN_RED
VolRenRed.
Definition SoColorMap.h:186
Interpolation
The colormap interpolation type.
Definition SoColorMap.h:287
@ NEAREST
Nearest-neighbor interpolation.
Definition SoColorMap.h:289
SoMFFloat colorMap
Array of floats in range [0,1].
Definition SoColorMap.h:280
Renders a scene graph using Open Inventor's Render Engine.
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Abstract base class for all database nodes.
Definition SoNode.h:145
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87