[vtkusers] honolulu.vtk on windows OS

Hao Li haoli2001 at hotmail.com
Wed Jun 22 09:35:58 EDT 2005


Hi All,

Has anybody tried to render sample data
honolulu.vtk(ftp://public.kitware.com/pub/vtk/vtk3.2/data/vtk20data.part2.ta
r.gz)
with your program on Windows OS?  I am experencing frozen screen and no
response from following Tcl code and C++ code.

Tcl code:

package require vtk

package require vtkinteraction

package require vtktesting

vtkDataSetReader part

part SetFileName "$VTK_DATA_ROOT/Data/honolulu.vtk"

vtkDataSetMapper partMapper

partMapper SetInput [part GetOutput]

vtkLODActor partActor

partActor SetMapper partMapper

eval [partActor GetProperty] SetColor $light_grey

partActor RotateX 30.0

partActor RotateY -45.0

vtkRenderer ren1

vtkRenderWindow renWin

renWin AddRenderer ren1

vtkRenderWindowInteractor iren

iren SetRenderWindow renWin

ren1 AddActor partActor

ren1 SetBackground 0.1 0.2 0.4

renWin SetSize 200 200

iren AddObserver UserEvent {wm deiconify .vtkInteract}

[ren1 GetActiveCamera] Zoom 1.5

renWin Render

wm withdraw .

C++ code;

   vtkDataSetReader *reader = vtkDataSetReader::New();
   vtkDataSetMapper *mapper = vtkDataSetMapper::New();
   vtkActor *actor = vtkActor::New();
   vtkRenderer *ren = vtkRenderer::New();
   vtkRenderWindow *rw  = vtkRenderWindow::New();

   reader->SetFileName("C:\honolulu.vtk");
   mapper->SetInput(reader->GetOutput());
   actor->SetMapper(mapper);

   ren->AddActor(actor);
   rw->AddRenderer(ren);

   rw->Render();

any comment are appreciated.

Thanks

Regards/Hao






More information about the vtkusers mailing list