[vtkusers] Screenshot Error

Wenlong Wang scc.wwl at gmail.com
Wed Oct 12 06:21:38 EDT 2011


What do you mean by fill image data?

Here is my code,

    imageFilter->SetInput(renWin);
    renWin->Finalize();
    imageFilter->Update();

    vtkJPEGWriter* jw = vtkJPEGWriter::New();
    imageFilter->SetMagnification(
2);
    imageFilter->SetInputBufferTypeToRGBA();
    imageFilter->Update();
    jw->SetFileName("testpicture.jpg");
    jw->SetInput(imageFilter->GetOutput());
    jw->Write();


Thank you very much.

Wenlong


2011/10/12 Jothy <jothybasu at gmail.com>

> Have you filled your imaeg data first?
>
> Jothy
>
> On Wed, Oct 12, 2011 at 11:15 AM, Wenlong Wang <scc.wwl at gmail.com> wrote:
>
>> Dear all,
>>
>> As I try to catch a screen shot of my model, there is a window pops out
>> and shows the following error information.
>>
>> 'ERROR: In ..\..\VTK\Filtering\vtkImageData.cxx, line 1467
>> vtkImageData (02468790): GetScalarPointer: Pixel (0, 0, 0) not in memory.
>>  Current extent= (0, -1, 0, -1, 0, 0)'
>>
>> According to this, it says the pixel at (0, 0, 0) doesn't exist. But it
>> obviously appear in the screen.
>>
>> Can anyone tell me how to resolve this? Thank you very much.
>>
>> Wenlong
>>
>> _______________________________________________
>> 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 K Selvaraj
> PhD Student
> University of Liverpool
> Liverpool,UK
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111012/dfb64b79/attachment.htm>


More information about the vtkusers mailing list