Relative Velocity

I'm not sure if I'm right but if I want to calculate the velocity in the frame coordinate of a bodies is it correct to use transform?

Example:

vx,vy,vz=link.transform(link.getVelocity())

Thanks