Re: [Paraview] Centering data

2010-08-07 Thread Eric E. Monson
Hey David, Here's another alternative using numpy. There may be a slightly more straightforward way to do it (so anyone please feel free to edit it, or pass along refinements/advice and I can edit it), but it works for me.

Re: [Paraview] Centering data

2010-08-06 Thread David Doria
On Thu, Aug 5, 2010 at 9:10 PM, Andy Bauer andy.ba...@kitware.com wrote: Use the calculator filter to create a vector array from the coordinates, then point to cell data, then integrate attributes to get the result divided by the volume/area to give the desired input to the transform filter.

Re: [Paraview] Centering data

2010-08-06 Thread David Doria
This seems weird.  What kind of data set do you have?  Is your data set already centered then?  I'd think there'd be some roundoff error so that it wouldn't be exactly 0 but a very small number.  Do you have any cells/what's the area result under the cell data? Sorry, I should have specified

Re: [Paraview] Centering data

2010-08-06 Thread Andy Bauer
Hmm, I guess you could use the Delauney 2D or 3D to create an area or volume but it might be tough using those since they grids they create may not be a good representation of your data geometry. I can't think of anything better than a programmable filter to get the desired translation amounts

Re: [Paraview] Centering data

2010-08-06 Thread Moreland, Kenneth
For the record, Andy's method is attempting to find the center of mass (assuming uniform density). If you just need the center of the bounds, you can go to the information panel, average the bounds in each dimension, and then do a translate transform to move that point to the origin. -Ken

Re: [Paraview] Centering data

2010-08-06 Thread David Doria
On Fri, Aug 6, 2010 at 12:21 PM, Moreland, Kenneth kmo...@sandia.gov wrote: For the record, Andy’s method is attempting to find the center of mass (assuming uniform density).  If you just need the center of the bounds, you can go to the information panel, average the bounds in each dimension,

[Paraview] Centering data

2010-08-05 Thread David Doria
Is there a way to center a data set? That is, simply subtract the center of mass from the data set? This would be helpful because when applying rotations it is much easier to hand-input the rotation parameters when the data is at the origin. Thanks, David

Re: [Paraview] Centering data

2010-08-05 Thread Andy Bauer
Use the calculator filter to create a vector array from the coordinates, then point to cell data, then integrate attributes to get the result divided by the volume/area to give the desired input to the transform filter. Andy On Thu, Aug 5, 2010 at 4:58 PM, David Doria daviddo...@gmail.com wrote: