BYU Writer ouput !!!!

Dr. Jasjit Suri jsuri at enya.picker.com
Tue Oct 12 16:53:15 EDT 1999


Hello ...

I have a very small script to read in the images
and write them as polygonal data (.g) BYU format...
The script is enclosed here.

I do get the woman.g output file fine.
To test if this output is correct, I read this woman.g
file using the Decimate.tcl program provided by VTK
present in /graphics/examplesTcl/Decimate.tcl
It says bad BYU movie..

Here is the script to read in the images
and write them as BYU format (.g) single file.

Note BYU only writes as triangle strips...
Thus polygonal data needs to be converted to triangles first.

Hope some guru can put forth his view here...

thanks very much...

..jas..
--------------------------------------------


vtkImageReader reader
reader SetFilePrefix "woman"
reader SetDataExtent 0 255  0 255 20 250
reader SetDataSpacing 1.0 1.0 1.0
reader SetDataVOI 0 255 0 255 21  216
reader SetHeaderSize 0
[reader GetOutput] SetOrigin 0.0 0.0 0.0
reader SetDataMask 0x7fff;
reader SetDataScalarTypeToUnsignedChar
reader SetDataByteOrderToBigEndian
reader Update

vtkImageToStructuredPoints SP
    SP SetInput [reader GetOutput]
    SP Update
puts "SP created.."

vtkStructuredPointsGeometryFilter polydata
    polydata SetInput [reader GetOutput]
    polydata SetExtent 0 255 0 255 50 52
puts "polydata created.."

vtkTriangleFilter triangles
  triangles SetInput [polydata GetOutput]

vtkBYUWriter byu
  byu SetGeometryFileName woman.g
  byu SetScalarFileName woman.s
  byu SetDisplacementFileName woman.d
  byu SetInput [triangles GetOutput]
  byu Write
-----------------------------------





-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list