Go to the documentation of this file.
10 #ifndef vtk_m_cont_ColorTable_h
11 #define vtk_m_cont_ColorTable_h
33 struct ColorTableInternals;
91 std::shared_ptr<detail::ColorTableInternals>
Internals;
189 const std::string& name,
192 const std::vector<vtkm::Float64>& rgbPoints,
193 const std::vector<vtkm::Float64>& alphaPoints = { 0.0, 1.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0 });
198 ColorTable& operator=(
const ColorTable&) =
default;
199 ColorTable(
const ColorTable&) =
default;
201 const std::string& GetName()
const;
202 void SetName(
const std::string& name);
211 static std::set<std::string> GetPresets();
241 bool LoadPreset(
const std::string& name);
248 ColorTable MakeDeepCopy();
261 void SetClamping(
bool state);
262 bool GetClamping()
const;
293 void ReverseColors();
381 return AddPointAlpha(x, alpha, 0.5f, 0.0f);
406 return AddSegmentAlpha(x1, alpha1, x2, alpha2, mid_sharp, mid_sharp);
585 void UpdateArrayHandles()
const;
589 #endif //vtk_m_cont_ColorTable_h
Manages an array-worth of data.
Definition: ArrayHandle.h:300
Groups connected points that have the same field value.
Definition: Atomic.h:19
Color Table for coloring arbitrary fields.
Definition: cont/ColorTable.h:89
vtkm::Int32 AddPointAlpha(vtkm::Float64 x, vtkm::Float32 alpha)
Adds a point to the opacity function.
Definition: cont/ColorTable.h:379
void SetClampingOff()
Definition: cont/ColorTable.h:260
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
void SetClampingOn()
If clamping is disabled values that lay out side the color table range are colored based on Below and...
Definition: cont/ColorTable.h:259
vtkm::Int32 AddSegmentAlpha(vtkm::Float64 x1, vtkm::Float32 alpha1, vtkm::Float64 x2, vtkm::Float32 alpha2)
Add a line segment to the opacity function.
Definition: cont/ColorTable.h:400
Color Sample Table used with vtkm::cont::ColorTable for fast coloring.
Definition: ColorTableSamples.h:32
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
Definition: exec/ColorTable.h:34
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
Color Sample Table used with vtkm::cont::ColorTable for fast coloring.
Definition: ColorTableSamples.h:51
Preset
Definition: cont/ColorTable.h:94
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:157
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:181
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
std::shared_ptr< detail::ColorTableInternals > Internals
Definition: cont/ColorTable.h:91
ColorSpace
Definition: exec/ColorTable.h:18
Represent a continuous scalar range of values.
Definition: Range.h:31