Reputation: 160
I run into strange issue with vtkResliceImageViewer in VTK 8.1.0. I use vtkResliceImageViewer for showing MPR image reconstruction from DICOM CT scan. And with particular scan I have artifacts on axial projection as you can see on the first image. The same scan in another 3DViewer has no such artifacts (the second image). The artifacts are exist on all projections I only choose here the one most obvious. There is no artifacts on oblique projections. There is no artifacts on 3D image (vtkImagePlaneWidget). I have not seen such artifacts before on another images. Have you any ideas what is it? What can be done to improve situaion?
Upvotes: 0
Views: 695
Reputation: 1645
As it appears as an interpolation artifact, you should check the underlying vtkImageReslice
for the current interpolation mode and change it if necessary:
vtkSmartPointer<vtkResliceImageViewer> viewer = vtkSmartPointer<vtkResliceImageViewer>::New();
vtkResliceCursorWidget * wg =viewer->GetResliceCursorWidget();
vtkResliceCursorRepresentation * rep = 0;
if ( wg )
{
rep = wg->GetResliceCursorRepresentation();
}
vtkImageReslice * reslice = 0;
if ( rep )
{
reslice = dynamic_cast<vtkImageReslice*>( rep->GetReslice() );
}
if ( reslice )
{
std::cout << "Old mode: " << reslice->GetInterpolationModeAsString() << std::endl;
reslice->SetInterpolationModeToLinear();
std::cout << "New mode: " << reslice->GetInterpolationModeAsString() << std::endl;
}
vtkImageReslice
(link) uses nearest neighbor by default and vtkResliceImageViewer
doesn't seem to change it.
Print out looks as:
Old mode: NearestNeighbor
New mode: Linear
Upvotes: 1