ScalarMapperContinuous.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2014, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVisualization/Base.h"
16 #include "CeeVisualization/ScalarMapperContinuousDomain.h"
17 #include "CeeVisualization/ColorTableFactory.h"
18 
19 #include <vector>
20 
21 namespace cee {
22 namespace vis {
23 
24 //==================================================================================================
25 //
26 //
27 //
28 //==================================================================================================
30 {
31 public:
33  virtual ~ScalarMapperContinuous();
34 
35  double rangeMinimum() const;
36  double rangeMaximum() const;
37  void setRange(double min, double max);
38 
39  void setColors(const std::vector<Color3f>& colorArray);
40  void setColors(ColorTableFactory::ColorTable colorTable);
41  void setColorsAtValues(const std::vector<double>& values, const std::vector<Color3f>& colorAtValues);
42 
43  virtual Vec2f mapToTextureCoordinate(double scalarValue) const;
44  virtual Color3f mapToColor(double scalarValue) const;
45 
46  virtual bool updateTexture(Image* image) const;
47 
48  virtual double normalizedValue(double domainValue) const;
49  virtual double domainValue(double normalizedPosition) const;
50 
51  virtual unsigned int version() const;
52 
53 private:
54  CEE_PRIVATE_IMPL(ScalarMapperContinuous);
55  CEE_DISALLOW_COPY_AND_ASSIGN(ScalarMapperContinuous);
56 
57  virtual cvf::ScalarMapperContinuousDomain* internal_cvfScalarMapper();
58 };
59 
60 } // namespace vis
61 } // namespace cee
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Base class for scalar mappers that implement normalizedValue / domainValue.
Definition: ScalarMapperContinuousDomain.h:38
ColorTable
The predefined color schemes supported by the color table factory.
Definition: ColorTableFactory.h:31
Class for storing an RGB color triplet.
Definition: Color3f.h:25
Vector class for a 2D float vector.
Definition: Vec2f.h:24
Maps scalar values to texture coordinates/colors using a continuous/gradient style color map...
Definition: ScalarMapperContinuous.h:29