Get a vector at specific voxel coordinates


I have applied a 3d sobel filter on vtkImageData like this:

vtkSmartPointer<vtkImageSobel3D> sobelFilter =

My question is how can I extract the vector field at a specific voxel coordinates. For exemple to extract a value we can do:

int coords[3] = {i, j, k};

vtkVariant variant = image->GetPointData()->GetScalars()-> GetVariantValue(input>ComputePointId(coords)); // to get 0 or 1

but what about vectors , I want to get the vector field produced by soble filter at {i,j,k] coordinates in c++? I have tried many solutions but I have not get good results.

Thank’s in advance