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

Method GetArrayPointer

Common/DataModel/vtkImageData.cxx:1454–1458  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This Method returns a pointer to a location in the vtkImageData. Coordinates are in pixel units and are relative to the whole image origin.

Source from the content-addressed store, hash-verified

1452// Coordinates are in pixel units and are relative to the whole
1453// image origin.
1454void* vtkImageData::GetArrayPointer(vtkDataArray* array, int coordinate[3])
1455{
1456 vtkIdType valueIndex = this->GetValueIndex(array, coordinate);
1457 return valueIndex >= 0 ? array->GetVoidPointer(valueIndex) : nullptr;
1458}
1459//------------------------------------------------------------------------------
1460void* vtkImageData::GetArrayPointer(vtkDataArray* array, int x, int y, int z)
1461{

Callers 5

GetScalarPointerMethod · 0.95
WriteFileMethod · 0.80
UpdateCacheMethod · 0.80

Calls 2

GetValueIndexMethod · 0.80
GetVoidPointerMethod · 0.45

Tested by

no test coverage detected