template <typename TImage>
void
DeepCopy(typename TImage::Pointer input, typename TImage::Pointer output)
{
output->SetRegions(input->GetLargestPossibleRegion());
output->Allocate();
while (!inputIterator.IsAtEnd())
{
outputIterator.
Set(inputIterator.Get());
++inputIterator;
++outputIterator;
}
}
int
main(int, char *[])
{
ImageType::Pointer image1 = ImageType::New();
ImageType::Pointer image2 = ImageType::New();
DeepCopy<ImageType>(image1, image2);
return 0;
}