How to determine the pixel number on SNAP corresponding to the CSV file

I have a .dim file on SNAP which i converted to CSV. The CSV file has all the pixels numbered and their band values read left to right top to bottom.
I wanted to check a particular pixel (let’s say pixel 3659) on the SNAP . How can I do it ? The pixel Info tab only has Image-X and Image_Y which correspond to the coordinates(but not the actual pixel number). is there a way to check the exact pixel value on SNAP?

No, this is not possible. you have to convert the index into X,Y coordinates.

@marpet i see, Thank you. Is there any preexisting formula/method to do it ?

Yes, this is explained here :
Converting 2D arrays to 1D and accessing as either 2D or 1D - Articles and information on C# and .NET development topics • Cyotek

It is one division and one modulo operation.

1 Like