[vtkusers] Need help with vtkShepard, or similar?

William Ray willray at mac.com
Fri May 20 10:05:10 EDT 2011



Greetings all,

I need some assistance with vtkShepardMethod, or something in its general neighborhood.

My data is a bunch of point-sampled data in a volume.

It is recorded as sample points, and sample values.

The sampling volume currently spans [0,1] [0,1] [0,1] , and the samples are likewise floats in the range [0,1], though I could scale these outside VTK if necessary.

Because the sampling contains positioning error, the samples _do_not_ lie on a regular grid.


What I need to do, is ray-cast (or possibly extract isosurfaces) from the volume sampled by these points.


As far as I can see, the correct approach is to use some re-sampling method to project the stochastically distributed samples into a regularly-sampled volume, and then render the regularly sampled volume.  This seems relatively straightforward, effectively I "splat" the samples into their general region of the data volume, and then raycast or surface from that structured data set.  I could probably do this outside VTK, but, it seems impossible that there isn't a good way to do this already built in.


vtkShepardMethod (passed through vtkImageShiftScale to coerce its 0..1 outputs into unsigned chars for the VolumeRayCaster) would appear to be one possible solution - but it's giving me the strangest results - when I try to rotate the rendered volume, I get strange "scaling-like" effects rather than rotations (I think the scaling-like effects are actually clipping-volume effects, with rotations of the rendering volume changing the clipping volume within it).


Can anyone provide any insight?  A sample bit of Python or Tcl that demonstrates a better way to do this?  Anything?

Thanks for your time,
Will Ray




More information about the vtkusers mailing list