Hello everyone,
I had to perform a migration from VTK 5.10 to VTK 6.3 recently, but I have been stuck with an unexpected behavior with the vtkImageData I’m trying to visualize. The values that should be fully transparent as it was with VTK 5.10 now appear in blue with VTK 6.3. The only change related to the migration and this vtkImageData I did in the code was to use SetInputData rather than SetInput :
...
vtkSmartPointer<vtkGPUVolumeRayCastMapper> mapper = vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();
mapper->SetAutoAdjustSampleDistances(1);
mapper->SetBlendModeToComposite();
#if VTK_MAJOR_VERSION <= 5
mapper->SetInput(myImageData);
#else
mapper->SetInputData(myImageData);
#endif
mapper->Update();
...
You can see the difference here:
There may have been a change in how the management of vtkImageData is handled between the two versions, but I can’t get my finger on it. I’m not asking for a solution, but if maybe someone had a clue about where the problem could be coming from, it would be very helpful.