[vtkusers] Save vtkChartXY to PNG

Jothybasu Selvaraj jothybasu at gmail.com
Wed Oct 24 07:55:57 EDT 2012


Here you go

vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
            vtkSmartPointer<vtkWindowToImageFilter>::New();
    windowToImageFilter->SetInput(this->view->GetRenderWindow());
    windowToImageFilter->Update();


    vtkSmartPointer<vtkPNGWriter> writer =
            vtkSmartPointer<vtkPNGWriter>::New();
    writer->SetFileName("FileName");
    writer->SetInput(windowToImageFilter->GetOutput());
    writer->Write();

Jothy

On Wed, Oct 24, 2012 at 12:52 PM, Jakub Poła <jakub.pola at gmail.com> wrote:
> Good Morning,
>
> I have question related to create charts in vtk. Is it possible to save
> chart as png image without creating the snapshot of window like in paraview?
> I would like to write a batch program which aims to analyze large data set
> and creates series of charts.
> I have vtkTable feeded by the vtkExtractArraysOverTime filter, then basing
> on this table I would like to create chart object which I would like save as
> PNG image.
>
> Thank you very much for your support.
> Jakub
>
> --
> Pozdrawiam,
> Jakub Poła
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Jothybasu Selvaraj
PhD Student
University of Liverpool
UK



More information about the vtkusers mailing list