[vtkusers] calculating the mean value of x-coordinate
xujf
xujf at sjtu.edu.cn
Thu Apr 1 22:51:04 EST 2004
Hi,
this is part of my program:
import sys,os
from paths import *
from vtkMINCReader import *
reader=vtkMINCReader()
reader.SetFileName("E:/picture/sbrain.mnc")
filter=vtkImageMarchingCubes()
filter.SetInput(reader.GetOutput())
filter.SetValue(0,1200)
I use vtkImageMarchingCubes to get the isosurface of a volume,then I want to calculate the mean value of x-coordinates of all points in the isosurface.
I know I should add up all the values and divide by the total number! but how can I get the total number and every point\'s x-coordinate value.
Thanks in advance!
xujf
what should I do next?
More information about the vtkusers
mailing list