[vtkusers] lost the colors
bluebyte
a.kuhr at gmx.de
Wed Jul 22 06:39:31 EDT 2009
Hello!
I am new with VTK (5.4.2). I found a brickexample at
http://www.rug.nl/cit/hpcv/visualisation/VTK/3Ds/man.html
# Create the RenderWindow, Renderer and both Actors
#
vtkRenderer ren1
vtkRenderWindow renWin
renWin AddRenderer ren1
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
# create pipeline
vtkStructuredPointsReader reader
reader SetFileName "$VTKDATA/heart.vtk"
reader Update
set dims [[reader GetOutput] GetDimensions]
set dim1 [lindex $dims 0]
set dim2 [lindex $dims 1]
set dim3 [lindex $dims 2]
vtkLookupTable lut
# blue to red
lut SetHueRange 0.66667 0.0
# procedure for one of the six outer planes of the data brick
proc plane {nm xmin xmax ymin ymax zmin zmax } {
vtkImageDataGeometryFilter plane$nm
plane$nm SetInput [reader GetOutput]
plane$nm SetExtent $xmin $xmax $ymin $ymax $zmin $zmax
vtkPolyDataMapper m$nm
m$nm SetInput [plane$nm GetOutput]
m$nm SetLookupTable lut
eval m$nm SetScalarRange [[reader GetOutput] GetScalarRange]
vtkActor a$nm
a$nm SetMapper m$nm
ren1 AddActor a$nm
}
plane xmin 0 0 0 $dim2 0 $dim3
plane xmax $dim1 $dim1 0 $dim2 0 $dim3
plane ymin 0 $dim1 0 0 0 $dim3
plane ymax 0 $dim1 $dim2 $dim2 0 $dim3
plane zmin 0 $dim1 0 $dim2 0 0
plane zmax 0 $dim1 0 $dim2 $dim3 $dim3
ren1 SetBackground 1 1 1
renWin SetSize 500 500
iren Initialize
renWin Render
# prevent the tk window from showing up then start the event loop
wm withdraw .
I try to run it. It tolds me:
vtkStructuredPointsGeometryFilter will be deprecated in
the next release after VTK 4.0. Please use
vtkImageDataGeometryFilter instead
I change it.
But the shown picture is only in black&white, no colors.
What I have to do, to see the brick with colors?
If I run some of the VTK-examples I see it with color.
Regards, Astrid
--
View this message in context: http://www.nabble.com/lost-the-colors-tp24423930p24423930.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list