Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoColorMap.h
Go to the documentation of this file.
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-2020 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
31#include <Inventor/SbPImpl.h>
32
33#ifdef _MSC_VER
34#pragma warning( push )
35#pragma warning(disable:4251)
36#endif
37
39
40
141class SoColorMap : public SoNode {
143
144 SO_PIMPL_BASE_PUBLIC_HEADER(SoColorMap)
145
146 public:
153
156
159
161 RGB_ALPHA
162 } ;
163
199
219
224
253
275
284
290 {
294 LINEAR
295 };
296
306
311
316 unsigned int getNumColor() const;
317
323
324private:
325 virtual void doAction(SoAction *action);
326 virtual void GLRender(SoGLRenderAction *action) ;
327 virtual void callback( SoCallbackAction* action );
328
329/*----------------------------------------------------------------------------*/
330
331private:
332
333 static void initClass();
334 static void exitClass();
335
339 virtual void notify(SoNotList *list);
340
341 //bind fragment and texture object
342 void enableFragment(SoState* state, SbBool enable);
343 //do the teximage or colortable for the palette
344 void installGLColorMap(SoState* state) ;
345
346 //Remap the defined color map between min and max indices
347 //minType and maxType are respectively the minimum value and
348 //the maximum value of the datatype
349 void reMap(float minType, float maxType, SbBool forceUpdate = FALSE);
350
351 // Returns the packed color map
352 unsigned int* getPackedColorMap() const;
353
358 virtual bool affectsPath() const;
359
360private:
361
365 virtual ~SoColorMap();
366
367private :
368
369 // Function to factorise constructors code
370 void construct();
371
372} ;
373/*----------------------------------------------------------------------------*/
374
375#ifdef _MSC_VER
376#pragma warning( pop )
377#endif
378
379#endif /* _SO_COLOR_MAP_ */
380
381
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
SO_PIMPL_BASE_PUBLIC_DECLARATION(SoImageDataAdapter)
virtual void enable(QWidget *w, XtEventHandler f, XtPointer data, void *unused=NULL)
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
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:141
SoSFEnum colorMapFormat
Indicates the format of the color map (number of color components).
Definition SoColorMap.h:274
SoColorMap()
Constructor.
ColorMapFormat
Color map format.
Definition SoColorMap.h:148
@ LUMINANCE_ALPHA
(2 floats)
Definition SoColorMap.h:155
@ ALPHA
(1 float)
Definition SoColorMap.h:152
@ RGB
(3 floats)
Definition SoColorMap.h:158
@ LUMINANCE
(1 float)
Definition SoColorMap.h:150
SoSFFloat max
See min.
Definition SoColorMap.h:223
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:218
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:305
SoSFEnum predefinedColorMap
Use this field to load predefined color maps.
Definition SoColorMap.h:252
PredefinedColorMap
Predefined color map.
Definition SoColorMap.h:165
@ VOLREN_GREEN
VolRenGreen.
Definition SoColorMap.h:191
@ STANDARD
Standard.
Definition SoColorMap.h:175
@ NONE
None.
Definition SoColorMap.h:167
@ BLUE_WHITE_RED
Blue white red.
Definition SoColorMap.h:183
@ INTENSITY
Intensity.
Definition SoColorMap.h:185
@ SEISMIC
Seismic.
Definition SoColorMap.h:181
@ AIRWAY
Airway.
Definition SoColorMap.h:193
@ LABEL_256
256 labels
Definition SoColorMap.h:187
@ GRAY
Gray (Default)
Definition SoColorMap.h:169
@ PHYSICS
Physics.
Definition SoColorMap.h:173
@ AIRWAY_SURFACES
Airway surfaces.
Definition SoColorMap.h:195
@ TEMPERATURE
Temperature.
Definition SoColorMap.h:171
@ GLOW
Glow.
Definition SoColorMap.h:177
@ BLUE_RED
Blue red.
Definition SoColorMap.h:179
@ VOLREN_RED
VolRenRed.
Definition SoColorMap.h:189
Interpolation
The colormap interpolation type.
Definition SoColorMap.h:290
@ NEAREST
Nearest-neighbor interpolation.
Definition SoColorMap.h:292
SoMFFloat colorMap
Array of floats in range [0,1].
Definition SoColorMap.h:283
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
void notify(SoNotList *list)