<div dir="ltr"><span style="font-size:12.8px">Hello. I try to do image registration between two images, called fixedImage and movingImage using firstly rigid transform and then affine transform.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">After I finish the rigid registration, I want to use the movingImage, after it gets transformed due to rigid registration,  and use the NEW movingImage as the movingimage input of the affine registration. Does the following code do the trick?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>        rigidTransform->SetParameters(registration->GetLastTransformParameters());</div><div><span style="white-space:pre-wrap">     </span></div><div><span style="white-space:pre-wrap"> </span>resample->SetTransform(rigidTransform);</div><div><span style="white-space:pre-wrap">       </span>resample->SetInput(movingImageReader->GetOutput());</div><div><br></div><div><span style="white-space:pre-wrap">       </span>resample->SetSize(fixedImage->GetLargestPossibleRegion().GetSize());</div><div><span style="white-space:pre-wrap">       </span>resample->SetOutputOrigin(fixedImage->GetOrigin());</div><div><span style="white-space:pre-wrap">        </span>resample->SetOutputSpacing(fixedImage->GetSpacing());</div><div><span style="white-space:pre-wrap">      </span>resample->SetOutputDirection(fixedImage->GetDirection());</div><div><br></div><div><span style="white-space:pre-wrap"> </span>registration->SetMovingImage(resample->GetOutput());</div></div></div>