[vtkusers] changing the bounding box

thomas thomas at cs.uno.edu
Wed Jul 16 11:47:38 EDT 2003


hi everybody

i am using a vtkWarpScalar to create a 3D image. Unfortunately, some scalar are set to vtk_min_float so the z is very low and when I try to render the image I see nothing.... Is it possible to change the bounding box to see something. I have looked on the on line help but I don't see a SetBounds method....

below is my tcl script

thanks for your help

thomas

package require vtklocal

vtkPolyDataReader reader
reader SetFileName "polyout_a2908901Old.vtk"

vtkWarpScalar warp
  warp SetInput [reader GetOutput]
  warp SetScaleFactor 0.025

vtkWindowLevelLookupTable look

vtkPolyDataMapper m
m SetInput [warp GetPolyDataOutput]
m SetScalarRange 0 2000
m ImmediateModeRenderingOff
m SetLookupTable look
puts "m..."
m Update
puts "done..."

vtkActor a 
a SetMapper m
a SetBounds 0 10000 0 10000 -100 1000

vtkRenderer ren
ren AddActor a

vtkRenderWindow renWin
renWin AddRenderer ren
renWin SetSize 800 600

vtkRenderWindowInteractor iren
iren SetRenderWindow renWin

puts "rendering..."
renWin Render
puts "done"
puts [a GetBounds]
iren Start
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030716/6b8c8295/attachment.htm>


More information about the vtkusers mailing list