<HTML>
<HEAD>
<TITLE>Re: [Paraview] Cells and Points in a Structured Grid Volume</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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.<BR>
<BR>
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.<BR>
<BR>
</SPAN></FONT><OL><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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).
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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.
</SPAN></FONT><LI><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Make a new reader that reads the data as cell data as it should.<BR>
</SPAN></FONT></OL><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
I hope that helps.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 2/26/10 8:45 AM, "Christian Werner" <<a href="christian.werner@rwth-aachen.de">christian.werner@rwth-aachen.de</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello!<BR>
<BR>
I am studying the Threshold Filter to dive more into the mechanics of<BR>
filtering and I just want to make sure I got the meaning of points and<BR>
cells right, especially when I have a structured grid volume as input.<BR>
<BR>
Such input comes with some typical raw volume file which consists of,<BR>
lets say, 512x512x128 voxels all of them having some value.<BR>
<BR>
Is it that this value is actually stored in a vtkPoints list that<BR>
contains uniformly distributed points in the volume? And a vtkCell in<BR>
this case gets the same value as the point because it contains only this<BR>
single point in its center? ( with value I mean what you get from<BR>
GetComponent(id,c) )<BR>
<BR>
So if I had some arbitrary (non-structured) input, a cell's value would<BR>
be the average of all points lying inside the cell and changing the cell<BR>
layout, i.e. making all cells bigger would accordingly change the<BR>
cell-point relationship and thus the cells value?<BR>
<BR>
<BR>
Best regards,<BR>
Christian<BR>
_______________________________________________<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="1"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:7.5pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>