Accessing data values along a view ray during ray casting

Is there a way that VTK can provide me the data value and the coordinate of the sample points along a view ray during ray casting algorithm?
My goal is to collect all samples from different viewpoints using VTK ray casting algorithm.

Thanks for any help!