We describe an investigation of the use of the Insight Toolkit (ITK), a widely used open-source image segmentation and registration software, to obtain the motion transform from the MR images for both rigid and deformable PET motion corrections for simultaneous PET/MR scans. A human brain PET/MR FDG study and two human cardiac PET/MR FDG studies were acquired on Siemens' Biograph-mMR. ITK's 3D-Versor registration was used to obtain the rigid motion transform of the brain from the moved and the reference T2 weighted MR images. Registrations based on B-Spline transform and Demons transform were used to obtain the deformable motion fields from the TWIST (Time-resolved angiography With Interleaved Stochastic Trajectories) and CINE MR images. The motion transforms derived from the registrations were then applied to the PET reconstructions. It has been observed that 3D-Versor registration produces accurate rigid motion transform. With regard to deformable motions, Demons transform performs slightly better than B-Spline transform in terms of %RMSE in the registered TWIST MR images. However, the motion field obtained from the TWIST MR images using Demons transform was observed to introduce irregular distortion in the PET image. On the other hand, Demons motion transforms obtained from the CINE images do not introduce any artifact in the PET image, whereas the B-Spline method does not register the CINE MR images very well. The motion corrected PET image has better signal-to-noise ratio than the gated PET image as expected.