[vtkusers] data convertion and colori ng problem.
iii-lin
iii-lin at 163.com
Sun Dec 24 08:08:43 EST 2006
hello Peter Spring,
Is that you want to use vtkPolyDataReader to read vtk file and display it?
I have a sample code and my outputs just black-white colors.
But you need to write to your codes.I just convert is into java.I did not have tcl or other language's code.
here it is:
///////////////////////////
ackage require vtk
package require vtkinteraction
vtkRenderer aRenderer
vtkRenderWindow renWin
renWin AddRenderer aRenderer
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
vtkPolyDataReader skinNormals
skinNormals SetFileName "C:/zhangh/VTK/out.vtk"
vtkPolyDataMapper skinMapper
skinMapper SetInputConnection [skinNormals GetOutputPort]
skinMapper ScalarVisibilityOff
vtkActor skin
skin SetMapper skinMapper
vtkCamera aCamera
aCamera SetViewUp 0 0 -1
aCamera SetPosition 0 1 0
aCamera SetFocalPoint 0 0 0
aCamera ComputeViewPlaneNormal
aRenderer AddActor skin
aRenderer SetActiveCamera aCamera
aRenderer ResetCamera
aCamera Dolly 1.5
aRenderer SetBackground 1 1 1
renWin SetSize 640 480
//////////////////////////////////
在2006-12-24,"Peter Spring" <meancity at gmail.com> 写道:
Dear all,
Goodday, and merry christmas.
i have met some problem when i generating some vtk binary data using
vtkPolyDataWrite.
what i did was using Dicom reader to read a set of dicom files and
construction iso surface after that i use vtkPolyDataWriter to save
the data to be vtk binary. things can be conducted perfectly but one
problem bothers me is the coloring.
when i read the generated vtk binary data, the data is shown with some
color. it is very strange because i did not assign any color when i
previously do the iso surface construction. and i notice that
different iso value has different color.... for the vtk binary data.
can someone help me on this issue since i do not want any color on the
vtk binary data.
thanks very much...
Yours
P.
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061224/f54ab43d/attachment.htm>
More information about the vtkusers
mailing list