[vtkusers] Convert vtkImageData to vtkPolyData

Boehm, Lukas Lukas.Boehm at cellent.de
Mon Nov 19 10:44:29 EST 2012


Hi Bill,

thank you very much for your response. This class solves my problem almost, but it changes the presentation.

Without this filter the vtkImageData is shown as a surface. When I use this filter and I zoom in, the single points are shown. So it isn't shown as surface anymore.

Do you know what I mean? Maybe I can upload some pictures, if you don't know what I'm talking about.

Thank you very much!
Lukas

-----Original Message-----
From: Bill Lorensen [mailto:bill.lorensen at gmail.com] 
Sent: Montag, 19. November 2012 16:05
To: Boehm, Lukas
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Convert vtkImageData to vtkPolyData

Try
vtkImageDataGeometryFilter

On Mon, Nov 19, 2012 at 6:42 AM, Boehm, Lukas <Lukas.Boehm at cellent.de> wrote:
> Hello,
>
>
>
> I've got the following situation: In the past I had to visualize some 
> isolines with vtkMarchingSquares filter. The input data for this 
> filter was a vtkImageData object. The vtkAlgorithmOutput object, which 
> is generated by vtkMarchingSquares, was clipped by using vtkExtractPolyDataGeometry.
>
>
>
> So the pipeline was: vtkImageData => vtkMarchingSquares => 
> vtkExtractPolyDataGeometry
>
>
>
>
>
> Now I want to visualize the same data as a heatmap. So I take the 
> image data and pass it to vtkDataSetMapper for visualization. The pipeline is:
> vtkImageData => vtkDataSetMapper
>
>
>
> This works also fine. Now I want to clip this heatmap, like I did with 
> the output from vtkMarchingSquares. But I get the following error when 
> using
> vtkExtractPolyDataGeometry:
>
>
>
> ERROR: In
> ..\..\..\..\vtksource-prefix\src\vtksource\Filtering\vtkDemandDrivenPi
> peline.cxx,
> line 827
>
> vtkStreamingDemandDrivenPipeline (188AEF28): Input for connection 
> index 0 on input port index 0 for algorithm 
> vtkExtractPolyDataGeometry(188AEEC8) is of type vtkImageData, but a vtkPolyData is required.
>
>
>
> Pipeline is here: vtkImageData => vtkExctractPolyDataGeometry => 
> vtkDataSetMapper
>
>
>
> So it tells me, I've got to convert the vtkImageData to vtkPolyData. 
> Is this right? How can I convert this?
>
>
>
> If you did not understand my problem, feel free to ask. I'll try to 
> explain it better J
>
>
>
> Kind regards,
>
> Lukas
>
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _
>
> cellent Aktiengesellschaft
> Vorsitzender des Aufsichtsrates: Dr. Martin Setzer 
> Vertretungsberechtigter Vorstand: Andreas Schwegler
> Gerichtsstand: Amtsgericht Stuttgart, HRB 22791
> Umsatzsteuer-ID: DE 226611517
> Firmensitz: Stuttgart
>
> Diese EMail sowie etwaige Anlagen sind ausschliesslich fuer den 
> Adressaten bestimmt und koennen vertrauliche oder gesetzlich 
> geschuetzte Informationen enthalten. Wenn Sie nicht der 
> bestimmungsgemaesse Empfaenger sind, unterrichten Sie bitte den 
> Absender und vernichten Sie diese Mail. Anderen als dem 
> bestimmungsgemaessen Adressaten ist es untersagt, diese EMail zu 
> speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch immer, zu verwenden.
> Wir verwenden aktuelle Virenschutzprogramme.
> Fuer Schäden, die dem Empfaenger gleichwohl durch von uns zugesandte, 
> mit Viren befallene EMails entstehen, schliessen wir jede Haftung aus.
>
> The information contained in this e-mail or attachments is intended 
> only for its addressee and may contain confidential and/or privileged 
> information. If you have received this e-mail in error, please notify 
> the sender and delete the e-mail. If you are not the intended 
> recipient, you are hereby notified, that saving, distribution or use 
> of the content of this e-mail in any way is prohibited.
> We use updated virus protection software. We do not accept any 
> responsibility for damages caused anyhow by viruses transmitted via e-mail.
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _
>
>
> _______________________________________________
> 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
>



--
Unpaid intern in BillsBasement at noware dot com



More information about the vtkusers mailing list