for (it=im.begin(); it!=im.end(); ++it)
{
vtkImageData* cur = mReader.GetImage( (*it) );
memcpy(out.img->GetScalarPointer(0,0,slice), cur->GetScalarPointer(0,0,0), imsize);
slice++;
for (it=im.begin(); it!=im.end(); ++it)
{
vtkImageData* cur = mReader.GetImage( (*it) );
memcpy(out.img->GetScalarPointer(0,0,slice), cur->GetScalarPointer(0,0,0), imsize);
slice++;