[Paraview] visualising a network of tubes and spheres using python programmable filter

Sreejith Kuttanikkad sreejithpk at gmail.com
Thu Apr 16 14:23:38 EDT 2009


Thanks a lot. I Just tried the alternative suggested and it seems to work.
Thanks again
Sreejith

On Thu, Apr 16, 2009 at 6:11 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> The tube filter only allows for using point data for scaling the
> tubes. Another alternative is create two data sources one for the
> sphere and one for the lines, and have duplicate points for the line
> ends with appropriate point data to avoid the tapering. In the end you
> can use AppendPolyData filter to append the two datasets into one.
>
> Utkarsh
>
> On Thu, Apr 16, 2009 at 4:41 AM, Sreejith Kuttanikkad
> <sreejithpk at gmail.com> wrote:
> > Dear all,
> > On Wed, Apr 15, 2009 at 6:26 PM, Utkarsh Ayachit
> > <utkarsh.ayachit at kitware.com> wrote:
> >>
> >> Read in the sphere radii and tube radii as point data on the dataset
> >> that you are creating. Both the glyph filter and the tube filter has
> >> options that allow you to scale the glyph (and the tube) by point
> >> data.
> >
> > I have been trying many things but still not able to get what i wanted.
> For
> > instance; please find a polydata xml file i created for a small cubic
> > network (8 spheres and 12 tubes).
> >
> > <?xml version="1.0"?>
> > <VTKFile type="PolyData" version="0.1" byte_order="LittleEndian">
> > <PolyData>
> > <Piece NumberOfPoints="8" NumberOfVerts="0" NumberOfLines="12"
> > NumberOfStrips="0" NumberOfPolys="0">
> > <Points>
> > <DataArray type="Float32" NumberOfComponents="3" format="ascii">
> > 0 0 0
> > 1 0 0
> > 0 1 0
> > 1 1 0
> > 0 0 1
> > 1 0 1
> > 0 1 1
> > 1 1 1
> > </DataArray>
> > </Points>
> > <Lines>
> > <DataArray type="Int32" Name="connectivity" format="ascii">
> > 0 1 2 3 0 2 1 3 4 5 6 7 4 6 5 7 0 4 1 5 2 6 3 7
> > </DataArray>
> > <DataArray type="Int32" Name="offsets" format="ascii">
> > 2 4 6 8 10 12 14 16 18 20 22 24
> > </DataArray>
> > </Lines>
> > <PointData Scalars="sph_dia">
> > <DataArray type="Float32" Name="sph_dia" format="ascii">
> >  2 5 6 8 9 4 3 8
> > </DataArray>
> > </PointData>
> > </Piece>
> > </PolyData>
> > </VTKFile>
> >
> >
> > If I read the above file with paraview and apply Glyph (sphere) and tube
> > filter, I can view the network with spheres and tubes. If i choose the
> scale
> > mode scalar and choose sph_dia, i can view spheres with different size.
> > Similarly If i choose "vary radius" option to tubes, the size of the tube
> is
> > varied based on the point data (sph_dia) and looks tapered (gradual
> change
> > in size) as shown in the attachment. But that is not I wanted. I have
> tube
> > diameter data and would like to be able to scale based on that and tube
> > should have uniform diameter from one end to the other.  Please let me
> know
> > if you have any suggestion or tips to attempt.
> >
> > thank you
> > Sreejith
> > IMFT Toulouse
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090416/12cf68b7/attachment.htm>


More information about the ParaView mailing list