[vtkusers] [VtkEdge] trying vtkKWEStructuredGridLIC2D

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Feb 17 09:26:19 EST 2009


Thanks Fabio, I've updated the documentation.

On Tue, Feb 17, 2009 at 8:46 AM, Fabio Meneghini
<fab.meneghini at gmail.com> wrote:
> ok, thanks.
> So, in the end, the input for the vtkKWEStructuredGridLIC2D must be a
> vtkStructuredGrid object... I hope this will soon be fixed on the
> related manual page.
> I will look at it, thank you very much again.
> Fabio
>
> 2009/2/17 Rocco Gasteiger <post at rocco-gasteiger.de>:
>> Hi Fabio,
>>
>> I've tried vtkKWEStructuredGridLIC2D class by my own and find no bug. Errors
>> occur only as I give wrong input to this class. I attached my example to
>> this mail, so you can follow the right connections. The code is not
>> commented and some lines are not necessary but the rest is quite simple to
>> understand. You can ignore the code snippets for reading a structured grid.
>> I generate an example structured grid and add a computed vector field to it.
>>
>>
>> By the way...the output of vtkKWEStructuredGridLIC2D is a structured grid.
>>
>> Hope this is helpful for you.
>>
>> Best regards, Rocco
>>
>>  It's a little bit tricky to find the correct input an
>> -----Original Message-----
>> From: vtkedge-bounces at vtkedge.org [mailto:vtkedge-bounces at vtkedge.org] On
>> Behalf Of Fabio Meneghini
>> Sent: Tuesday, February 17, 2009 12:39 PM
>> To: vtkedge at vtkedge.org
>> Subject: Re: [VtkEdge] trying vtkKWEStructuredGridLIC2D
>>
>> HI,
>> It becomes to seem there's a bug in the vtkKWEStructuredGridLIC2D class.
>> In the manual it is written that "The input on port 0 is an
>> vtkImageData with extents of a 2D image."
>> But on runtime, I get this error:
>> "Input for connection index 0 on input port index 0 for algorithm
>> vtkKWEStructuredGridLIC2D(0x1162290) is of type vtkImageData, but a
>> vtkStructuredGrid is required."
>> Furthermore, I still can't understand which output type is returned by
>> this class, and how to visualize it.
>> Thanks for the help
>>
>> Fabio
>>
>> 2009/2/17 Fabio Meneghini <fab.meneghini at gmail.com>:
>>> Please, correct me if I am wrong, but it seems to me that
>>> vtkKWEStructuredGridLIC2D gives a vtkStructuredGrid as outputs??
>>> If this is the case, how am I supposed to render it?
>>> thanks
>>>
>>> Fabio
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Fabio Meneghini <fab.meneghini at gmail.com>
>>> Date: 2009/2/17
>>> Subject: trying vtkKWEStructuredGridLIC2D
>>> To: vtkedge at vtkedge.org
>>>
>>>
>>> Hi, I'm trying to work with the vtkKWEStructuredGridLIC2D class, but I
>>> got no results. I feel like I screw up something about the
>>> vtkImageViewer2....Actually I don't know if the following code is
>>> "conceptually" valid:
>>>
>>> Note that piano->GetOutput()  is a vtkImageData (since "piano" is an
>>> instance of the vtkImageReslice class...)
>>>
>>> vtkKWEStructuredGridLIC2D *lic = vtkKWEStructuredGridLIC2D::New();
>>>       lic->SetInput(piano->GetOutput());
>>>       lic->SetSteps(40));
>>>       lic->SetStepSize(0.4));
>>>       lic->SetMagnification(1));
>>>
>>> vtkImageViewer2 *viewer = vtkImageViewer2::New();
>>>       viewer->SetInputConnection(lic->GetOutputPort());
>>>
>>> vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();
>>>       viewer->SetupInteractor(rwi);
>>>       viewer->Render();
>>>
>>> The program execution gives me no errors at all, but no Render window
>>> is neither opened...
>>> Is there something wrong?
>>> Any hint will be very appreciated, thanks
>>>
>>> Fabio
>>>
>> _______________________________________________
>> VtkEdge mailing list
>> VtkEdge at vtkedge.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge
>>
> _______________________________________________
> 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
>



More information about the vtkusers mailing list