Hello all,<br><br>I have an object of class vtkImageData.<br>It has two arrays: density (scalar) and velocity (vector).<br><br>I want to know mean and median values of the density field.<br><br>I tried to use vtkImageAccumulate to achieve this goal, but<br>
my program crashes on my input (actually, I don't know how<br>to specify on which of the arrays I want to apply. How<br>should I do it?)<br>When I tried to specify origin and spacing, I got similar result (seg fault)<br>
<br> vtkImageAccumulate *Accumulate = vtkImageAccumulate::New();<br> Accumulate->SetInput(grid); <br> Accumulate->Update(); <------- crashes here<br>
double *mean = Accumulate->GetMean();<br><br><br>Thank you!<br>ula<br>