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

Method MapScalarsThroughTable2

Rendering/Core/vtkColorTransferFunction.cxx:1809–1841  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1807
1808//------------------------------------------------------------------------------
1809void vtkColorTransferFunction::MapScalarsThroughTable2(void* input, unsigned char* output,
1810 int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
1811{
1812 if (this->GetSize() == 0)
1813 {
1814 vtkDebugMacro("Transfer Function Has No Points!");
1815 return;
1816 }
1817 if (this->IndexedLookup)
1818 {
1819 switch (inputDataType)
1820 {
1821 // Use vtkExtendedTemplateMacro to cover case of VTK_STRING input
1822 vtkExtendedTemplateMacro(vtkColorTransferFunctionIndexedMapData(this,
1823 static_cast<VTK_TT*>(input), output, numberOfValues, inputIncrement, outputFormat, 1));
1824
1825 default:
1826 vtkErrorMacro(<< "MapImageThroughTable: Unknown input ScalarType");
1827 return;
1828 }
1829 }
1830 else
1831 {
1832 switch (inputDataType)
1833 {
1834 vtkTemplateMacro(vtkColorTransferFunctionMapData(this, static_cast<VTK_TT*>(input), output,
1835 numberOfValues, inputIncrement, outputFormat, 1));
1836 default:
1837 vtkErrorMacro(<< "MapImageThroughTable: Unknown input ScalarType");
1838 return;
1839 }
1840 }
1841}
1842
1843//------------------------------------------------------------------------------
1844vtkIdType vtkColorTransferFunction::GetNumberOfAvailableColors()

Callers 2

TestOLTFunction · 0.45
TestOLTFunction · 0.45

Calls 3

GetSizeMethod · 0.95

Tested by 2

TestOLTFunction · 0.36
TestOLTFunction · 0.36