Hi,
You haven't configured your output, assuming rectilinear grid you need
to set the extent and provide coordinate arrays.
You are indexing a point based array with cell based index, so the
lookup you make into vtkVarray is incorrect. 'Extent' tells you the
number of cells, not the number
Hi,
Thanks for your help both of you.
Cheers for pointing out my Cell-Point mistake Burlen, I actually am
increasing my extents (extent[1]+1 for example) to compensate for this, but
I did make a mistake in my final call
*out.GetCellData().AddArray(newArray)*
*
*
which should be getting
I actually am increasing my extents (extent[1]+1 for example) to
compensate for this,
yes you added one. that is needed to compute the number of cells from
the extents. you still need to add one to the result (the number of
cells) to get the number of points. As is, you are not looking up the
In general you can't assume that extent[0] = extent[2] = extent[4] = 0.
Maybe it is for your data sets but it is not required.
I didn't fully go through your code to debug but I am working on a filter
that does a similar operation in either the x, y, or z topological
direction. It also works in
Hi there,
I am trying to write a programmable filter which will take my
RectilinearGrid data and modify one of the data arrays. Specifically I want
to sum over one dimension. I have written something to do this, but my data
comes out garbled.
Below is my code. Basically all I am doing is