[vtkusers] [Fwd: Re: extracting a surface from scalars]

Oliver Rudolph oliver.rudolph at iisb.fraunhofer.de
Tue May 4 08:31:51 EDT 2010


Hi Flo,

you can try using either vtkMarchingCubes to get iso surfaces or, if you
prefer "iso volumes", use vtkClipVolume. With them you can define some
scalar threshold value that is used for the extraction.

HTH,
Oli



Florian Sylla wrote:
> hello,
> 
> in the following code there are skalarDatas assigned to every grid
> point. I used the LookupTable-function for coloring the different
> skalarvalues. So i got a nice colored output(for example the pressure
> gradient).
> Now i'm trying to get a surface(3D) out of my colored objekt with only
> one defined Scalarvalue, e.g. to see where in my object the pressure is
> at exactly 2bar.
> 
> Someone can give me a hint?
> 
> Thanks
> Flo
> 
> 
> # set name of the scalar data array to stressselection
> self.stressScalarArray.SetName(self.scalSelection)
>             
> # add scalar data array to main grid
> self.warpVector.GetOutput().GetPointData().AddArray(self.stressScalarArray)
> 	    
> # label scalar data array as an attribute to main grid
> self.assignScalar = vtk.vtkAssignAttribute()
> self.assignScalar.SetInput(self.warpVector.GetOutput())
> self.assignScalar.Assign(self.scalSelection, 'SCALARS', 'POINT_DATA')
> self.assignScalar.Update()
> 	    	    
> 	    self.warpVectorMapper.SetInput(self.assignScalar.GetOutput())
> self.warpVectorMapper.SetLookupTable(self.lookup)
> 
> _______________________________________________
> 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
> 
> 


-- 
Oliver Rudolph            Topography Simulation
Fraunhofer IISB           Tel. +49 9131 761-215, Fax -212
Schottkystrasse 10        mailto:oliver.rudolph at iisb.fraunhofer.de
91058 Erlangen, Germany   http://www.iisb.fraunhofer.de



More information about the vtkusers mailing list