Search code examples
image-processingvtkitk

no override found for 'vtkRayCastImageDisplayHelper'


I want to read series of DICOMs images and rendering them into a 3d volume. For this purpose I am using this code except that I used:

vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();
reader->SetDirectoryName("ABEDINI^SHAHBEYGOM_1");

to read my DICOM series. I read DICOM successfully but in rendering step I have these Errors:

Generic Warning: In F:\VTK- 
8.1.0\Source\Rendering\Core\vtkRenderWindow.cxx,line 43   
Error: no override found for 'vtkRenderWindow'.

Generic Warning: In F:\VTK- 
8.1.0\Source\Rendering\Core\vtkPolyDataMapper.cxx, line 28
Error: no override found for 'vtkPolyDataMapper'.

Warning: In F:\VTK- 
8.1.0\Source\Rendering\Core\vtkInteractorStyleSwitchBase.cxx, line 43
vtkInteractorStyleSwitchBase (0000000000283740): Warning: Link to 
vtkInteractionStyle for default style selection.

Generic Warning: InF:\VTK_8.1.0\Source\Rendering\Core\vtkRenderer.cxx,line55 
Error: no override found for 'vtkRenderer'.

I added these lines befor main function:

#include "vtkAutoInit.h" 
VTK_MODULE_INIT(vtkRenderingOpenGL2); // VTK was built with 
vtkRenderingOpenGL2
VTK_MODULE_INIT(vtkInteractionStyle);

But now the error is:

Generic Warning: In F:\VTK- 
8.1.0\Source\Rendering\Volume\vtkRayCastImageDisplayHelper.cxx, line 20
Error: no override found for 'vtkRayCastImageDisplayHelper'.

What should I do? Any help would be welcome


Solution

  • It was looking for vtkOpenGLRayCastImageDisplayHelper, in vtkRenderingVolumeOpenGL2. By linking program to vtkRenderingVolumeOpenGL2 the error will disappear.