[vtkusers] dynamically linked wrapped tcl and vtk code

Katherine Kerekes kerekes at fastmail.fm
Wed Jun 16 22:34:07 EDT 2004


Hello All,
 
I am trying to create a wrapped tcl program using vtk.  I am using
TclPro and trying to follow their documentation on "Creating and
Distributing Dynamically-Linked Wrapped Applications."  My code runs in
the wish shell using the "package require vtk" and "package require
vtkinteraction" statements.  My first goal in order to create my wrapped
application is to get my tcl code to recognize the vtk commands using
the "load vtk*TCL.dll" rather than "package require."
 
These are the beginning lines of my code:
 
lappend auto_path C:/Program Files/vtk42/bin 
load vtkIOTCL.dll
load vtkCommonTCL.dll
load vtkRenderingTCL.dll
load vtkRenderingPythonTkWidgets.dll
load vtkFilteringTCL.dll
load vtkHybridTCL.dll
load vtkParallelTCL.dll
load vtkGraphicsTCL.dll
load vtkImagingTCL.dll
 
When I try to run in the wish shell, my program begins reading in data
 
vtkImageReader2 reader
            reader SetDataExtent 0 [expr $Xdim-1] 0 [expr $Ydim-1]
$Zstart $Zend
            if {$dataType=="short"} {
                        reader SetDataScalarTypeToShort
            } else {
                        reader SetDataScalarTypeToFloat
            }
            reader SetDataByteOrderToLittleEndian
            reader SetFilePrefix $dataDir 
            reader SetFilePattern $filepattern
 
            reader SetProgressMethod {set progress [reader
GetProgress];setProgress $progress \
                                                            "Loading
Files:  [expr $progress*100]%"; update}
            reader Update
 
my progress bar shows that it is reading in all of my data files.  Then,
just as it finishes I get this "Error in Startup script:  could not find
vtkImageData: vtkTemp1 while executing vtkImageDataToTkPhoto ."
 
Am I missing a library?  Is vtkImageDataToTkPhoto included in the dlls?
It works fine with the package require, but vtkImageDataToTkPhoto is not
included in the documentation, so I wonder if it is included in the
dlls.
 
Any help would be appreciated.
 
Kate Kerekes
 
            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040616/7b980ce7/attachment.htm>


More information about the vtkusers mailing list