Render a specific array from a VTI file

Hi all,

I am trying to do volume rendering on a specific array from a vti data. The vti data can have multiple arrays. This is similar to select an array from the drop down list to do volume rendering. I am not sure how to select the array to be used.

Thanks for your time and help,
Soumya

I was able to solve the problem, here is the solution for others who may need it:
here data is vtkimagedata with multiple arrays.

data = reader.GetOutput()
data.GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray(arr_name))