In a 3D structured grid, there is the concept of points and cells and VTK does 
in fact differentiate the two.  In particular, 8 points make up a 
hexahedral-shaped voxel cell.  As is dictated by the topology, there is one 
fewer cell than points in each dimension.  For example, if the grid has 
512x512x128 points, it will have 511x511x127 cells.

The raw image reader simply assumes you want to load the data as point data and 
creates the grid accordingly.  I don't think there is any way to make it load 
the data as cells.  I can think of three ways to handle this.


 1.  Close your eyes, take a deep breath, and find the inner peace to simply 
let ParaView/VTK treat the data as point data.  I cannot think of any operation 
on cell data that can not be done on point data.  You just have to realize that 
ParaView will also let you do some operations that may not be appropriate for 
cell data (particularly those that interpolate the values in the cells).
 2.  Make a filter that converts the structured grid that has point data to one 
that has cell data.  It would simply create a new topology on the output with 
one more point in every dimension and then shallow copy the data as cell data.  
It should not be too hard to implement.  No, I am not volunteering.
 3.  Make a new reader that reads the data as cell data as it should.

I hope that helps.

-Ken


On 2/26/10 8:45 AM, "Christian Werner" <christian.wer...@rwth-aachen.de> wrote:

Hello!

I am studying the Threshold Filter to dive more into the mechanics of
filtering and I just want to make sure I got the meaning of points and
cells right, especially when I have a structured grid volume as input.

Such input comes with some typical raw volume file which consists of,
lets say, 512x512x128 voxels all of them having some value.

Is it that this value is actually stored in a vtkPoints list that
contains uniformly distributed points in the volume? And a vtkCell in
this case gets the same value as the point because it contains only this
single point in its center? ( with value I mean what you get from
GetComponent(id,c) )

So if I had some arbitrary (non-structured) input, a cell's value would
be the average of all points lying inside the cell and changing the cell
layout, i.e. making all cells bigger would accordingly change the
cell-point relationship and thus the cells value?


Best regards,
Christian
_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to