typedef itk::CheckerBoardImageFilter< itk::Image< short, 2>> CheckerBoardFilterType;
CheckerBoardFilterType::Pointer checker = CheckerBoardFilterType::New();
checker->SetInput1(fixedImage);
checker->SetInput2(resample->GetOutput());
checker->GetOutput() 即可以得到你想要的