[vtkusers] Extracting a sphere with vtkSphereWidget

TJ Corona tj.corona at kitware.com
Wed Jun 6 08:27:15 EDT 2018


Hi Tomas,

> My task is to extract a sphere from a model using vtkSphereWidget and visualize its scalar atrribute distribution using vtkGlyphs.

Your problem may be that glyphs are more appropriate for vector datasets. In which direction would you like the glyphs to point? If you which for the glyphs to point radially outward and have a magnitude dictated by some scalar attribute, I believe you will have to construct that dataset yourself (cell normals * scalar value) and set it as your dataset’s vector field. Hope this helps!

Sincerely,
T.J.

> On Jun 5, 2018, at 7:29 PM, TomasKiniulis <tkiniulis at gmail.com> wrote:
> 
> Hi T.J.
> 
> Thanks a lot for the response!
> 
> I did some progress on the task, using vtkCutter a sphere is extracted
> correctly now. Although, right now, my problem is that all of the glyphs are
> pointing to one direction. How can I make the glyphs point according to
> scalar attribute distribution?
> 
> This is the code so far:
> https://pastebin.com/yNYAEUgc
> Model file used:
> https://drive.google.com/file/d/1kZAFNFdw65PdiW1m1Ksstt_CKZLcFKPo/view?usp=sharing
> 
> Regards,
> Tomas Kiniulis
> 
> 
> 
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> 
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers



More information about the vtkusers mailing list