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

Method SetComponentWeight

Rendering/Core/vtkVolumeProperty.cxx:602–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602void vtkVolumeProperty::SetComponentWeight(int index, double value)
603{
604 if (index < 0 || index >= VTK_MAX_VRCOMP)
605 {
606 vtkErrorMacro("Invalid index");
607 return;
608 }
609
610 double val = std::min(std::max(value, 0.0), 1.0);
611 if (this->ComponentWeight[index] != val)
612 {
613 this->ComponentWeight[index] = val;
614 this->Modified();
615 }
616}
617
618//------------------------------------------------------------------------------
619double vtkVolumeProperty::GetComponentWeight(int index)

Callers 3

DeepCopyMethod · 0.95
SetupVectorModeMethod · 0.80
__init__Method · 0.80

Calls 3

minFunction · 0.50
maxFunction · 0.50
ModifiedMethod · 0.45

Tested by 1

__init__Method · 0.64