how to traverse cells || RE: [vtkusers] which vtk classes to use?

lisa hughes lost_bits1110 at hotmail.com
Fri Feb 20 16:17:25 EST 2004


okay p.s.
when i have created my vtkplanesource..how the heck can i traverse the 
cells?? i.e. traverse the quadrilaterals created by these cells..?

i figure i should do planesource->GetOutput()
but then what?
i want to access and manipulate these individual cells




>From: David.Pont at ForestResearch.co.nz
>To: "lisa hughes" <lost_bits1110 at hotmail.com>
>CC: vtkusers at vtk.org
>Subject: RE: [vtkusers] which vtk classes to use?
>Date: Fri, 20 Feb 2004 11:39:02 +1300
>
>
>Hi Lisa,
>   yes you are right. Actually the points will be at the quad corners, so
>the scalars would be associated with the points which is the usual
>situation, ie point data, rather than the less common cell data.
>But there is no need for 'images' and textures (unless you really wanted an
>'image' output), less is more...
>     Dave
>
>
>
>
>                       "lisa hughes"
>                       <lost_bits1110 at ho        To:       
>David.Pont at forestresearch.co.nz, vtkusers at vtk.org
>                       tmail.com>               cc:
>                                                Subject:  RE: [vtkusers] 
>which vtk classes to use?
>                       20/02/2004 10:46
>
>
>
>
>
>
>Hi David,
>Thanks for your reply,
>So when I create vtkStructuredPoints with dimensions that match the plane
>resolution, will each point be at the center of each quadrilateral created
>by vtkPlaneSource? If not, cant I just traverse the quadrilaterals
>themselves and generate my spherical set of points - find my average
>velocity - and then associate this scalar velocity value with that
>particular quadrilateral cell to color in the cell?
>Why do i need to use vtkTexture?
>
>Also, do you think its better to use vtkImageData instead of
>vtkStructuredPoints (in the vtk book it says that they will be phasing out
>vtkStructuredPoints ..?)
>
>Thanks again! I truly apprecieat it,
>lisa
>
> >Or you could just sample your field 'on the fly' using the probe filter
> >concept:
> >Create a vtkPlaneSource, place it with SetCentre, SetNormal, use
> >SetXResolution and SetYResolution to suitable values (probably quite 
>high)
> >for sampling your 'field'.
> >Create a vtkStructuredPoints with dimensions matching the plane
>resolution.
> >Traverse the points in the plane, at each point generate your spherical
>set
> >of random points, calculate the average velocity value and insert this
> >value (may need manipulation) into the structured points at the
>appropriate
> >location.
> >Create a vtkTexture and set the structured points as input.
> >Pass the plane to a mapper, then actor, apply the texture to the plane
>with
> >actor->SetTexture.
> >This should give an 'image' of the velocity field pasted onto the plane.
> >There are probably alternatives that output data sets other than
>structured
> >points, eg polydata.
> >
> >   Dave Pont
> >
> >
> >
> >
> >                       "lisa hughes"
> >                       <lost_bits1110 at ho        To:       
>vtkusers at vtk.org
> >                       tmail.com>               cc:
> >                       Sent by:                 Subject:  RE: [vtkusers]
> >which vtk classes to use?
> >                       vtkusers-admin at vt
> >                       k.org
> >
> >
> >                       20/02/2004 08:05
> >
> >
> >
> >
> >
> >
> >
> >so basically I just need an idea for the pipeline...
> >
> >Thanks again ,
> >lisa
> >
> >
> > >
> > >Hey vtkusers,
> > >
> > >Say I already have a 3D unstructured mesh
> > >
> > >and I have generated points which I seed within this mesh via a random
> > >gaussian generator of spherical shape.  So basically i have a bunch of
> > >'spheres' at various locations (inside my 3D mesh), and inside of each
> > >sphere are points that have been randomly generated.   Then for each
> >sphere
> > >I have one scalar value associated with it (say an average velocity
>value
> > >of all the points that were contained within that one sphere)
> > >
> > >and I would also like to slice through the mesh according to some 
>normal
> > >and then color code the sliced mesh according to velocity info I have
> >(via
> >
> > >those random points within each sphere location)
> > >
> > >So far, I was able to just color code just the points that I've seeded,
> >so
> >
> > >basiclaly u just see a bunch of discrete points, of some color, within
>my
> > >3D mesh (i didint slice it yet)
> > >
> > >but say i want each of my 'spheres' to take up 1 mm squared of my 
>screen
> >(i
> > >dont know how many pixels that would be?) and  i want to color-in those
> >set
> > >of pixels according to that single scalar value associated with that
> >sphere
> > >
> > >how can i represent this?
> > >glyphs?? i have no clue where to start at this point!
> > >thanks in advance!! any help is truly appreciated
> > >
> > >_________________________________________________________________
> > >Dream of owning a home? Find out how in the First-time Home Buying
>Guide.
> > >http://special.msn.com/home/firsthome.armx
> > >
> > >_______________________________________________
> > >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
> >
> >_________________________________________________________________
> >Say "good-bye" to spam, viruses and pop-ups with MSN Premium -- free 
>trial
> >offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/
> >
> >_______________________________________________
> >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
> >
> >
> >
> >
> >
> >_______________________________________________
> >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
>
>_________________________________________________________________
>Watch high-quality video with fast playback at MSN Video. Free!
>http://click.atdmt.com/AVE/go/onm00200365ave/direct/01/
>
>
>
>
>
>
>_______________________________________________
>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

_________________________________________________________________
Say “good-bye” to spam, viruses and pop-ups with MSN Premium -- free trial 
offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/




More information about the vtkusers mailing list