[vtkusers] Simple vertex is square with VTK 7.1, was round with VTK 6.3 (old backend)

Simon ESNEAULT simon.esneault at gmail.com
Wed Mar 8 09:00:24 EST 2017


Hello VTK

This super simple program does not give me the same result with VTK 7.1
(OpenGL2 backend) than it did with VTK 6.3 (old OpenGL backend)

//----------------------------------------------------------------------------------------------------------------
#include "vtkIdList.h"
#include "vtkPNGWriter.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkProperty.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkWindowToImageFilter.h"

int main( int argc, char *argv[] ){

    vtkSmartPointer<vtkPoints> l_vertex = vtkSmartPointer<vtkPoints>::New();
    l_vertex->SetNumberOfPoints( 1 );

    vtkSmartPointer<vtkIdList> l_pix_cell =
vtkSmartPointer<vtkIdList>::New();
    l_pix_cell->InsertNextId( 0 );

    vtkSmartPointer<vtkPolyData> l_polydata =
vtkSmartPointer<vtkPolyData>::New();
    l_polydata->Allocate( 1 );
    l_polydata->SetPoints( l_vertex );
    l_polydata->InsertNextCell( VTK_VERTEX, l_pix_cell );

    vtkSmartPointer<vtkPolyDataMapper> l_mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
    l_mapper->SetInputData( l_polydata );

    vtkSmartPointer<vtkActor> l_actor = vtkSmartPointer<vtkActor>::New();
    l_actor->SetMapper( l_mapper );
    l_actor->GetProperty()->SetPointSize( 20 );

    vtkSmartPointer<vtkRenderer> l_renderer =
vtkSmartPointer<vtkRenderer>::New();
    l_renderer->AddActor( l_actor );

    vtkSmartPointer<vtkRenderWindow> l_render_window =
vtkSmartPointer<vtkRenderWindow>::New();
    l_render_window->AddRenderer( l_renderer );
    l_render_window->Render();

    vtkSmartPointer<vtkWindowToImageFilter> l_window_to_image =
vtkSmartPointer<vtkWindowToImageFilter>::New();
    l_window_to_image->SetInput( l_render_window );

    vtkSmartPointer<vtkPNGWriter> l_writer =
vtkSmartPointer<vtkPNGWriter>::New();
    l_writer->SetFileName( "simple-vertex.png" );
    l_writer->SetInputConnection( l_window_to_image->GetOutputPort() );
    l_writer->Write();
}
//----------------------------------------------------------------------------------------------------------------

The VTK 6.3 vertex was a nice round while the VTK 7.1 is a square, see the
attached screenshot ...

Is there some additional parameter/option that need to be turned on
somewhere to restore that functionality ?

Thanks
Simon


-- 
------------------------------------------------------------------
Simon Esneault
Rennes, France
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170308/7f3120be/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple-vertex-vtk-6.3.png
Type: image/png
Size: 574 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170308/7f3120be/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple-vertex-vtk-7.1.png
Type: image/png
Size: 401 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170308/7f3120be/attachment-0003.png>


More information about the vtkusers mailing list