VTK-m  2.0
ConvertToRGB.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_worklet_colorconversion_ConvertToRGB_h
11 #define vtk_m_worklet_colorconversion_ConvertToRGB_h
12 
15 
16 namespace vtkm
17 {
18 namespace worklet
19 {
20 namespace colorconversion
21 {
22 
24 {
25  using ControlSignature = void(FieldIn in, FieldOut out);
26  using ExecutionSignature = _2(_1);
27 
28  template <typename T>
29  VTKM_EXEC vtkm::Vec3ui_8 operator()(const T& in) const
30  { //vtkScalarsToColorsLuminanceToRGB
32  return vtkm::Vec<UInt8, 3>(la, la, la);
33  }
34 
35  template <typename T>
37  { //vtkScalarsToColorsLuminanceAlphaToRGB (which actually doesn't exist in vtk)
38  return this->operator()(in[0]);
39  }
40 
41  template <typename T>
43  { //vtkScalarsToColorsRGBToRGB
47  }
48 
50  { //vtkScalarsToColorsRGBToRGB
51  return in;
52  }
53 
54  template <typename T>
56  { //vtkScalarsToColorsRGBAToRGB
60  }
61 };
62 }
63 }
64 }
65 #endif
vtkm::worklet::colorconversion::ConvertToRGB::operator()
VTKM_EXEC vtkm::Vec3ui_8 operator()(const vtkm::Vec< T, 4 > &in) const
Definition: ConvertToRGB.h:55
vtkm::worklet::colorconversion::ConvertToRGB::operator()
VTKM_EXEC vtkm::Vec3ui_8 operator()(const vtkm::Vec< T, 3 > &in) const
Definition: ConvertToRGB.h:42
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
WorkletMapField.h
vtkm::worklet::WorkletMapField::FieldOut
A control signature tag for output fields.
Definition: WorkletMapField.h:60
vtkm::worklet::colorconversion::ConvertToRGB::ControlSignature
void(FieldIn in, FieldOut out) ControlSignature
Definition: ConvertToRGB.h:25
vtkm::worklet::colorconversion::ConvertToRGB
Definition: ConvertToRGB.h:23
vtkm::worklet::colorconversion::ConvertToRGB::operator()
VTKM_EXEC vtkm::Vec3ui_8 operator()(const vtkm::Vec3ui_8 &in) const
Definition: ConvertToRGB.h:49
Conversions.h
vtkm::worklet::colorconversion::ConvertToRGB::operator()
VTKM_EXEC vtkm::Vec3ui_8 operator()(const T &in) const
Definition: ConvertToRGB.h:29
vtkm::Vec< T, 4 >
Definition: Types.h:1093
vtkm::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::worklet::colorconversion::ConvertToRGB::operator()
VTKM_EXEC vtkm::Vec3ui_8 operator()(const vtkm::Vec< T, 2 > &in) const
Definition: ConvertToRGB.h:36
vtkm::Vec< T, 2 >
Definition: Types.h:859
vtkm::UInt8
uint8_t UInt8
Definition: Types.h:157
vtkm::worklet::colorconversion::ColorToUChar
VTKM_EXEC vtkm::UInt8 ColorToUChar(T t)
Definition: Conversions.h:21
vtkm::Vec< T, 3 >
Definition: Types.h:975
vtkm::Vec< vtkm::UInt8, 3 >
vtkm::worklet::colorconversion::ConvertToRGB::ExecutionSignature
_2(_1) ExecutionSignature
Definition: ConvertToRGB.h:26
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38