[vtkusers] vtkContourFilter::SetValue-Can anyone help me ?
Benjamin King
king.benjamin at mh-hannover.de
Thu Oct 23 05:51:54 EDT 2003
Hello Anh,
vtkContourFilter can generate more than one contour at a time. The first
parameter of vtkContourFilter::SetValue(int i, float value) is the contour
number - you can set it to 0 all the time, if you only want to generate a
single contour. The second parameter is the scalar value that defines the
contour. The filter extracts all points where that value is found (not
quite, but it computes a reasonable approximization of that set of points).
To get an idea about which value to use for the contouring, you could use a
tool that can display your data slice by slice and prints which value is at
which position. One example for such a tool would be MRIcro:
http://www.cla.sc.edu/psyc/faculty/rorden/mricro.html
cheers,
Benjamin
>
> Hi all VTK users!
>
> I'm a VTK newbie;I'm developing a VTK Application .
> I want render 3D volume from a serie of 2D slices(images)!
> I've used code like in VTK example
> (vtk\Examples\Medical\TCL\Medical3.tcl) :
>
> 1 vtkContourFilter skinExtractor
> 2 skinExtractor SetInput [v16 GetOutput]
> 3 skinExtractor SetValue 0 500
> 4 vtkPolyDataNormals skinNormals
> 5 skinNormals SetInput [skinExtractor GetOutput]
> 6 skinNormals SetFeatureAngle 60.0
> 7 vtkStripper skinStripper
> 8 skinStripper SetInput [skinNormals GetOutput]
> 9 vtkPolyDataMapper skinMapper
> 10 skinMapper SetInput [skinStripper GetOutput]
> 11 skinMapper ScalarVisibilityOff
> 12 vtkActor skin
> ..... And so on!
> It works well.
> but my problem is with a specific serie of slices , I can't determine
> which value is used in SetValue function in line 3 (for example , this is
> 500 but i dont know how to calculator it)
> (Both Parameters , but 2nd Parameter is more imporant).
> I ve tried to find the solution in VTK document,example ... but it has no
> good result.
> Can anyone help me ?
> I'm using vtk4.2 !
> Thanks !
>
>
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
--
Benjamin King
Institut für Medizinische Informatik
Medizinische Hochschule Hannover
Tel.: +49 511 532-2663
More information about the vtkusers
mailing list