[vtkusers] Convert Binary Image to vtkPolyData

David Gobbi david.gobbi at gmail.com
Fri Sep 15 13:39:01 EDT 2017


Hi Siming,

Is your goal to to use vtkProbeFilter on the volume?  If so, then
converting to vtkPolyData is going in the wrong direction.  A vtkPolyData
is just a surface, it isn't volumetric (i.e. it isn't possible to have a
vtkPolyData that has a node at each voxel).

Also, interpolating data from vtkImageData is, in general, much more
efficient than interpolating data from vtkPolyData or from a
vtkUnstructuredGrid.

Can you give us the big picture of what kind of result you are aiming for?

 - David


On Fri, Sep 15, 2017 at 2:09 AM, Siming Bayer <siming.bayer at gmail.com>
wrote:

> Dear all,
>
> I still have another question according to this isseue:
>
> I just tried the vtkMarchingCubes. This works fine. I got a isosurface of
> type vtkMarchingCubes. But since I would like to use the vtkProbeFilter to
> interpolate the values on the nodes of a volumetric mesh to a dicom image
> volume, I need to convert the vtkMarchingCubes to vtkPolyData, where the
> cell centers are the center of each voxel. Is there any filter which
> provides this function?
>
> best,
> Siming
>
> 2017-09-14 22:10 GMT+02:00 Siming Bayer <siming.bayer at gmail.com>:
>
>> Thank you guys!
>>
>> best,
>> Siming
>> > Am 14.09.2017 um 20:05 schrieb Bill Lorensen <bill.lorensen at gmail.com>:
>> >
>> > This example might help.
>> > https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/
>> ContourTriangulator/
>> >
>> >
>> > On Thu, Sep 14, 2017 at 10:47 AM, David Gobbi <david.gobbi at gmail.com>
>> wrote:
>> >> And, of course, vtkMarchingSquares for 2D images.
>> >>
>> >>
>> >> On Thu, Sep 14, 2017 at 8:43 AM, Dean Inglis <inglis.dl at gmail.com>
>> wrote:
>> >>>
>> >>> Hi Siming,
>> >>>
>> >>> you could use vtkImageMarchingCubes to extract an isosurface.
>> >>>
>> >>> - Dean
>> >>>
>> >>> On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer <
>> siming.bayer at gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Dear all,
>> >>>>
>> >>>> I know that vtkPolyDataToImageStencil can be used to convert
>> vtkPolyData
>> >>>> to a binary image. Is there any possibility to do it in the inverse
>> way? I
>> >>>> would like to use a binary image to generate a mesh via VTK.
>> >>>>
>> >>>> best,
>> >>>> Siming
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170915/506febbf/attachment.html>


More information about the vtkusers mailing list