MCPcopy Create free account
hub / github.com/Kitware/VTK / GetBackgroundColor

Method GetBackgroundColor

Rendering/Core/vtkImageMapper3D.cxx:1023–1044  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1021
1022//------------------------------------------------------------------------------
1023void vtkImageMapper3D::GetBackgroundColor(vtkImageProperty* property, double color[4])
1024{
1025 color[0] = 0.0;
1026 color[1] = 0.0;
1027 color[2] = 0.0;
1028 color[3] = 1.0;
1029
1030 if (property)
1031 {
1032 vtkScalarsToColors* table = property->GetLookupTable();
1033 if (table)
1034 {
1035 double v = property->GetColorLevel() - 0.5 * property->GetColorWindow();
1036 if (property->GetUseLookupTableScalarRange())
1037 {
1038 v = table->GetRange()[0];
1039 }
1040 table->GetColor(v, color);
1041 color[3] = table->GetOpacity(v);
1042 }
1043 }
1044}
1045
1046//------------------------------------------------------------------------------
1047void vtkImageMapper3D::CheckerboardRGBA(unsigned char* data, int xsize, int ysize, double originx,

Callers 15

ApplyViewThemeMethod · 0.45
ApplyViewThemeMethod · 0.45
View.cxxFile · 0.45
RenderTexturedPolygonMethod · 0.45
RenderMethod · 0.45
MakeWordTextureMethod · 0.45
RenderGL2PSMethod · 0.45
DrawStringMethod · 0.45
MapTextPropertyToIdMethod · 0.45
RenderBackgroundMethod · 0.45

Calls 6

GetColorLevelMethod · 0.80
GetColorWindowMethod · 0.80
GetLookupTableMethod · 0.45
GetRangeMethod · 0.45
GetColorMethod · 0.45
GetOpacityMethod · 0.45

Tested by 2

TestFlagpoleLabelFunction · 0.36
TestImageAndAnnotationsFunction · 0.36