[Insight-users] fast copy

Arnaud Garcia arnaud.garcia at sim.hcuge.ch
Mon Mar 13 12:09:42 EST 2006


Hello,

Is it the fast and safe ;-) way to do a full copy of images:

unsigned long outputImageDataSize = 
outputImage->GetPixelContainer()->Size();
OutputImagePixelType* importPointer = 
imageOne->GetPixelContainer()->GetBufferPointer();
OutputImagePixelType* bufferPointer 
=imageTwo->GetPixelContainer()->GetBufferPointer();
memcpy(bufferPointer, importPointer, 
outputImageDataSize*sizeof(OutputImagePixelType));

thanks,


Arnaud


More information about the Insight-users mailing list