MCPcopy Create free account
hub / github.com/Kitware/TeleSculptor / isArrayValidForColoring

Method isArrayValidForColoring

gui/VolumeOptions.cxx:304–326  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

302
303//-----------------------------------------------------------------------------
304bool VolumeOptions::isArrayValidForColoring(vtkDataArray* a, bool& mapScalars)
305{
306 if (!a)
307 {
308 return false;
309 }
310 int numberOfComponents = a->GetNumberOfComponents();
311 if (numberOfComponents == 4 || numberOfComponents == 3)
312 {
313 // RGBA or RGB
314 mapScalars = false;
315 return true;
316 }
317 else if (numberOfComponents == 1)
318 {
319 mapScalars = true;
320 return true;
321 }
322 else
323 {
324 return false;
325 }
326}
327
328//-----------------------------------------------------------------------------
329void VolumeOptions::surfaceColoringModeChanged(int index)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected