[vtkusers] Obtain same visualization of vtkResliceImageViewer using vtkImagePlaneWidget

Jan Jose Hurtado Jauregui jan.hurtado at gmail.com
Thu Sep 28 15:03:59 EDT 2017


Hi all,

I am using vtkResliceImageViewer and vtkImagePlaneWidget to show slice
planes. My problem is that i can't obtain the same behavior of the image
viewer for the plane widget. Please see the attached figure where the green
colored voxels have a smooth transition in the image viewer and in the case
of the plane widget they look bigger. I am setting the plane widget in this
way:

vtkSmartPointer<vtkProperty> ipwProp2 = vtkSmartPointer<vtkProperty>::New();
t_planeWidget = vtkSmartPointer<vtkImagePlaneWidget>::New();
t_planeWidget->SetInteractor(iren);
t_planeWidget->SetPicker(picker);
t_planeWidget->RestrictPlaneToVolumeOn();
double t_color[3] = { 1, 1, 1 };
t_planeWidget->GetPlaneProperty()->SetColor(t_color);
t_planeWidget->SetTexturePlaneProperty(ipwProp2);
t_planeWidget->TextureInterpolateOff();
t_planeWidget->SetResliceInterpolateToLinear();
t_planeWidget->SetInputData(m_data.m_visualization_segmented_volume);
t_planeWidget->SetPlaneOrientation(0);
t_planeWidget->SetSliceIndex(imageDims[0] / 2);
t_planeWidget->SetDefaultRenderer(ren);
t_planeWidget->GetTexture()->SetLookupTable(lookupTable);
t_planeWidget->GetTexture()->MapColorScalarsThroughLookupTableOn();
t_planeWidget->On();
t_planeWidget->InteractionOff();

Both objects are sharing the same image (i.e.
m_data.m_visualization_segmented_volume) and the same lookup table. I don't
know if the texture is resampled or something like that. In summary i want
to obtain the same image in both objects, the vtkImageActor of the image
viewer and the vtkActor of the plane widget. I am using VTK 7.1.0.

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170928/6a64cdb1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.jpg
Type: image/jpeg
Size: 125507 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170928/6a64cdb1/attachment-0001.jpg>


More information about the vtkusers mailing list