[vtkusers] Help with vtkStructuredPoints

Tan Jui Cheng (Chen Weizhen) jctan at email.com
Sun Feb 10 22:18:22 EST 2002


Hi all,
        I've just started working on VTK a few weeks ago. I had tried out indepth 2 of the examples ("Cube.cxx" and "Vol.cxx") to get more familiarized with the Polygonal Dataset and Structured Points Dataset. I have no problem with creating visual output using the "polygonal" method, but not with the "structured points" method. I understand some fundamental concepts of the structured points dataset like:
  
1) topology is defined by data dimensions(nx * ny * nz). 
2) number of cells is defined by (nx-1)*(ny-1)*(nz -1). 
3) geometry is defined by data spacing and origin.      

        In the "Vol.cxx" example, the dimension is set to 26*26*26, with spacing of 1/25 in x,y,z plane and origin set to (-0.5, -0.5, -0.5). Please correct me if I am wrong, my understanding is that an invisible cubic volume of 26*26*26 points having its origin at (-0.5, -0.5, -0.5), the spacing of each point is 1/25 or 0.04. In the example, every point is being defined by the scalar value, s, where s=(x*x+y*y+z*z) - (0.4*0.4), the explicit equation of a sphere. I have tried assigning different value of s, either by assigning it with random numbers or a constant value, but by doing so, nothing will display. Why is this so? So, how can I generate a volume with any scalar value I assign myself? What is the relationship between a scalar value and the "contour-filter"? How can I create a cube instead?

Thanks.


-- 

_______________________________________________
Win a ski trip!
http://www.nowcode.com/register.asp?affiliate=1net2phone3a





More information about the vtkusers mailing list