[vtkusers] How to write multiple surfaces into a single STL file?
Huiqun Zhou
zhou_huiqun at hotmail.com
Sun Feb 22 03:52:08 EST 2004
Jiye,
You can use multi actors, each for one iso-surface extracted from your
data with vtkContourFilter or
vtkMarchingCubes, and then you can create multi renderers for your actors,
one for each. The important
point is to create a render window with sufficient size and divide the
window into viewports, just one
for each actor. In this way, you can pick and elements on any iso-surfaces
you created, and you can
easily, I think and I never tried myself, save you data together because
everything is in only one render
window.
Cheers!
Huiqun Zhou
----- Original Message -----
From: "An Jiye" <an_jiye at hotmail.com>
To: <goodwin.lawlor at ucd.ie>
Cc: <vtkusers at vtk.org>
Sent: Friday, February 20, 2004 9:05 AM
Subject: Re: [vtkusers] How to write multiple surfaces into a single STL
file?
> > You can:
> > 1. Use vtkAppendPolyData to append all the outputs from multiple
> > vtkContourFilter's into one PolyData
> > 2. Just use one instance of vtkContourFilter (and one vtkActor etc) in
the
> > first place, extracting all the contours by setting multiple contour
> values
> > in the one filter
> >
> > HTH
> >
> > Goodwin
>
> Thank your for the hint£¬Goodwin. Definitely, this will help me very
much.
>
> I think maybe the second method is easily to understand, anyway all the
> surfaces come from the same data set.
>
> But in my application, I will pick point from EACH surface after
rendering.
> As I understand, actor is the object of vtk picking. So I can not pick
> points from some inside surfaces if all of them were extracted and
rendered
> by a single actor. Each of these inside surfaces are a part of the actor
and
> they were coverd by some other parts. I can not separate them.
>
> Considering this point, I will make each actor represents a surface. No
> matter which surface I want to pick on, I can set other
actors'(surfaces)
> PickableOff, or even VisibilityOff.
>
> So my visualization pipeline will be like this:
>
> vtkImageData -> vtkContourFilter(value 1) -> vtkPolyDataMapper ->
vtkActor
> vtkImageData -> vtkContourFilter(value 2) -> vtkPolyDataMapper ->
vtkActor
> .. ...
>
> When rendering, add all these actors into one render window. And the
picking
> function can be applied to each actor.
>
> As for saveing the rendering result into STL file, I will remove all the
> actors and data mappers. Instead, use vtkAppendPolyData::AddInput() to
> appent all the contour filters' outpus into a single polygonal dataset.
The
> remaining parts of the wring pipline would be:
>
> vtkAppendPolyData -> vtkTriangleFilter -> vtkSTLWriter
>
> Did I fully understand you?
>
> An Jiye
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list