[Paraview] Cells and Points in a Structured Grid Volume
John Mitchell
jamitch at sandia.gov
Mon Mar 1 13:04:00 EST 2010
Not sure if this is the appropriate thread:
What happens in parallel if a connectivity array for a given cell has
point id's that are off-processor?
Suppose:
* processor P0 owns points x1, x2, x3 -- numCells = 3; cell c1(x1)
connectivity = {x2, x8}
* processor P1 owns point x4, x5, x6,x7,x8 -- numCells = 4; cell c8
(x8) connectivity = {x7, x2}
What I have found is that setting global Ids on P0 for connectivity
associated with c1 causes problems? Does that make sense? Is there a
work around?
Thanks,
John
Moreland, Kenneth wrote:
> Please read /The VTK User’s Guide/. In particular, Chapter 12 talks
> about the structure, implementation, and interface of VTK data
> objects. It should clear up lots of your questions.
>
> http://www.kitware.com/products/books/vtkguide.html
>
>
> The Threshold filter converts the data from a structured grid to an
> unstructured grid (because it changes the topology). The connectivity
> and coordinates are no longer implicit, so they have to be stored in
> files. Thus, running the Threshold filter can actually change your
> data a lot. There is a longer discussion of this in /The ParaView
> Tutorial/, section 3.8.
>
> http://www.paraview.org/Wiki/The_ParaView_Tutorial
>
>
> -Ken
>
>
> On 2/28/10 3:42 AM, "Christian Werner"
> <christian.werner at rwth-aachen.de> wrote:
>
> Thank you very much. Now things have become a little clearer. Anyway
> there are a few things which I do not yet understand.
>
> I see now from the source of the Threshold plugin that the data to be
> processed is actually obtained in three different ways:
>
> vtkPointData *pd=input->GetPointData(), *outPD=output->GetPointData();
> vtkCellData *cd=input->GetCellData(), *outCD=output->GetCellData();
>
> vtkDataArray *inScalars = this->GetInputArrayToProcess(0,inputVector);
> //inputVector is the input information vector
>
>
> where the latter seems to be the array containing the actual volume
> data. The decision if a cell or point goes through the thresholding
> criteria is made a little later:
>
> keepCell = this->EvaluateComponents( inScalars, ptId );
> or
> keepCell = this->EvaluateComponents( inScalars, cellId );
>
>
> This raises two questions:
>
> 1) are the ptId and cellId disjunct?
> 2) if yes, does that mean that the InputArray contains point AND cell
> data? This clearly would require additional memory which is bad if you
> are working with big volumes.
>
> Also I see the use of a DataSet which seems to hold all the cells
> of the
> volume and each cell seems to contain points ( these must be 8,
> right? )
> I guess these points store coordinates? At least there is still
> another
> array containing only IDs. It seems as if there actually is a bunch of
> redundant information stored when I read structured grid, or at least
> when executing the Threshold filter.
>
> This would explain why the memory usage skyrockets when
> manipulating our
> 700MB (small version!) volume.
>
> I don't want to complain here about anything, that memory issue is
> another story. More important to me is that I understand the structure
> of this.
>
>
> Best regards,
> Christian
>
>
>
>
> Moreland, Kenneth wrote:
> > 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.werner at 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: kmorel at sandia.gov
> > ** *** ** phone: (505) 844-8919
> > *** web: http://www.cs.unm.edu/~kmorel
> <http://www.cs.unm.edu/%7Ekmorel> <http://www.cs.unm.edu/%7Ekmorel>
> >
>
>
>
>
>
> **** Kenneth Moreland
> *** Sandia National Laboratories
> ***********
> *** *** *** email: kmorel at sandia.gov
> ** *** ** phone: (505) 844-8919
> *** web: http://www.cs.unm.edu/~kmorel
> <http://www.cs.unm.edu/%7Ekmorel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100301/4dadb870/attachment-0001.htm>
More information about the ParaView
mailing list