I am looking for explanations and advices, I hope you can help. I would like to be able to Graft an itk::Image to an itk::CudaImage (which is similar to itk::GPUImage). Recently, I have removed some code in itk::CudaImage (doing this) to be more consistent with itk::GPUImage, see this commit but, as you can see, the FirstCudaReconstruction.py example becomes more complex: it actually reproduces by hand the itk::Image::Graft function see here and here. This function is inaccessible because this line is in the protected section. So I first tried to simply move it to the public section but that does not work because SetPixelContainer is not virtual (and therefore not overriden in itk::GPUImage) so the wrong version is called by itk::Image::Graft.
So my questions are:
- is this intentional that some functions are not virtual in itk::Image and shadowed by itk::GPUImage?
- what is the best solution here? To shadow Graft(itk::Image *) in itk::GPUImage?
Thanks in advance!