[vtkusers] vtkImageAccumulate

Ula Popov ula.popov at gmail.com
Fri Apr 29 02:33:08 EDT 2011


Hello all,

I have an object of class vtkImageData.
It has two arrays: density (scalar) and velocity (vector).

I want to know mean and median values of the density field.

I tried to use vtkImageAccumulate to achieve this goal, but
my program crashes on my input (actually, I don't know how
to specify on which of the arrays I want to apply. How
should I do it?)
When I tried to specify origin and spacing, I got similar result (seg fault)

        vtkImageAccumulate *Accumulate = vtkImageAccumulate::New();

Accumulate->SetInput(grid);


Accumulate->Update();
<------- crashes here
        double *mean = Accumulate->GetMean();


Thank you!
ula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110428/91fef638/attachment.htm>


More information about the vtkusers mailing list