Quantcast

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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Simon ESNEAULT-2
Hello VTK developers

This simple program does not give 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 disk while the VTK 7.1 is a square, see the attached screenshot ...

Is there some additional parameters/settings that need to be turned on somewhere to restore that functionality ?

Thanks

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers


simple-vertex-vtk-6.3.png (788 bytes) Download Attachment
simple-vertex-vtk-7.1.png (550 bytes) Download Attachment
Loading...