[vtkusers] Problems with vtkDataReader.cxx

Bill Lorensen bill.lorensen at gmail.com
Thu Nov 19 10:50:43 EST 2009


Looks like you are missing the data that goes with the examples. Or
you are not running from the proper directory.

Did you try running the examples following the steps at:
http://scv.bu.edu/documentation/tutorials/VTK/#START

Bill

2009/11/19 Sérgio Augusto <sergioaugustoav at gmail.com>:
> Hi everyone,
>
> I'm trying to execute some example files to learn about vtk but when I try
> to execute one of these examples I get this error:
>
>> ERROR: In C:\Dashboards\Releases\rc-VTK-5-4-2\VTK\IO\vtkDataReader.cxx,
>> line 462
>> vtkStructuredGridReader (0B3A0940): Unable to open file: Data/subset.vtk
>
> The code of the example is this:
>
>> package require vtk
>> package require vtkinteraction
>>
>> vtkLookupTable lut
>> #    lut SetNumberOfColors 8
>>     lut SetNumberOfColors 16
>> #    lut SetNumberOfColors 32
>> #    lut SetNumberOfColors 64
>> #    lut SetNumberOfColors 128
>> #    lut SetNumberOfColors 256
>>     lut SetHueRange 0.0 0.667
>>     lut Build
>>
>> vtkStructuredGridReader reader
>>     reader SetFileName "Data/subset.vtk"
>>     reader Update
>>
>> vtkDataSetMapper mapper
>>     mapper SetInputConnection [reader GetOutputPort]
>>     mapper SetLookupTable lut
>>     eval mapper SetScalarRange [[reader GetOutput] GetScalarRange]
>>
>> vtkActor actor
>>     actor SetMapper mapper
>>
>> vtkRenderer ren1
>> vtkRenderWindow renWin
>>     renWin AddRenderer ren1
>> vtkRenderWindowInteractor iren
>>     iren SetRenderWindow renWin
>>
>> ren1 AddActor actor
>> ren1 SetBackground 0.5 0.5 0.5
>> renWin SetSize 500 500
>>
>> iren AddObserver UserEvent {wm deiconify .vtkInteract}
>> renWin Render
>>
>> wm withdraw .
>
> Does anyone knows what is it?
> I'm using vtk 5.4.2 downloaded from
> http://www.vtk.org/VTK/resources/software.html and the examples are from
> http://scv.bu.edu/documentation/tutorials/VTK/#INTRO
>
> Thanks,
>
> Sergio
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list