[vtkusers] How to run example MandelbrotViewer.tcl

Roman Grothausmann roman.grothausmann at helmholtz-berlin.de
Fri Jul 20 08:45:07 EDT 2012


Trying to run any example containing vtkTkImageViewerWidget does not 
work either. What am I doing wrong here?

LIBRARY_OUTPUT_PATH=/opt/vtk-5.10.0_dyn+py2.7+tcl/lib/vtk-5.10/ \
LD_LIBRARY_PATH=$LIBRARY_OUTPUT_PATH \
PYTHONPATH=~/programs/VTK/Wrapping/Python:${LIBRARY_OUTPUT_PATH} \
TCLLIBPATH="/opt/vtk-5.10.0_dyn+py2.7+tcl/lib/vtk-5.10/" \
/opt/vtk-5.10.0_dyn+py2.7+tcl/bin/vtk  \
~/programs/VTK/Examples/ImageProcessing/Tcl/MandelbrotViewer.tcl

invalid command name "vtkTkImageViewerWidget"
     while executing
"vtkTkImageViewerWidget $manFrame.view \
         -iv viewer \
         -width [expr $XRAD*2] \
         -height [expr $YRAD*2]"
     invoked from within
"set manView [vtkTkImageViewerWidget $manFrame.view \
         -iv viewer \
         -width [expr $XRAD*2] \
         -height [expr $YRAD*2]]"
     (file 
"/home/grothama/sda8/programme/VTK/Examples/ImageProcessing/Tcl/MandelbrotViewer.tcl" 
line 102)


On 20.07.2012 14:16, Roman Grothausmann wrote:
> On 18.07.2012 14:50, Roman Grothausmann wrote:
>> However, I now get an error: "invalid command name" (see below).
>> Luis recommends concerning this error here:
>> http://www.itk.org/pipermail/insight-users/2009-October/033146.html
>> to use SegmentationEditorFltkGui, which I'm testing at the moment.
>
> WatershedSegmentationFltkGui3D works, but it seems not to have the
> functionality to click on segments to combine these and to render the
> selected segments in a 3D view as the TCL SegmentationEditor does.
> It would be nice to get the TCL SegmentationEditor running again.
>
> In the diff to one of the TCL examples using vtkTkImageViewerWidget:
>
> http://vtk.org/gitweb?p=VTK.git;a=blobdiff;f=Examples/ImageProcessing/Tcl/Histogram.tcl;h=59310eea3c1d8ec03cf09cb3c263c3209325183c;hp=37d4c4e80d6e7e8fcd9443ebcbbd8d888f703c80;hb=cf5d71cc898aa16565391deaa9d3a03e22e080af;hpb=d71598878ce54e44318e6f5472a4be5e9c78a15a
>
>
> I found these changes concerning vtkTkImageViewerWidget:
>
> -vtkTkImageViewerWidget .top.f1.r1 -width 64 -height 64 -iv viewer2
> +set vtkiw [vtkTkImageViewerWidget .top.f1.r1 \
> +        -width [expr ($xMax - $xMin + 1) * $mag_factor] \
> +        -height [expr ($yMax - $yMin + 1) * $mag_factor] \
> +        -iv viewer2]
> +
> +# Setup some Tk bindings, a generic renwin interactor and VTK observers
> +# for that widget
> +
> +::vtk::bind_tk_imageviewer_widget $vtkiw
> +
> +# Create the histogram widget
> +
> +source HistogramWidget.tcl
> +
> +set hist [vtkHistogramWidget .top.f1.r2 512 192]
> +
> +set slice_number [viewer2 GetZSlice]
>
> -set hist [vtkHistogramWidget .top.f1.r2]
>
> But trying to adjust PreprocessorModule.tcl at line 276 accordingly did
> not work out. The error remains the same.
>
> Any ideas what else I could do about this?
>
> Many thanks
> Roman
>
>> I wonder, if the TCL SegmentationEditor should be removed from future
>> InsightApplications releases since it seems not functional any more.
>>
>>
>> me at work:~/programs/InsightApplications-4.1.1/SegmentationEditor/Scripts$
>> \\
>> LD_LIBRARY_PATH=/opt/vtk-5.10.0_dyn+py2.7+tcl/lib/vtk-5.10/ \\
>> TCLLIBPATH="/opt/vtk-5.10.0_dyn+py2.7+tcl/lib/vtk-5.10/" \\
>> ~/programs/InsightApplications-4.1.1/build_vtk-5.10.0/SegmentationEditor/Wrapping/Tcl/WSTITK
>>
>> Main.tcl
>>
>> Error in startup script: invalid command name "vtkTkImageViewerWidget"
>>      while executing
>> "vtkTkImageViewerWidget $f.$fr.viewer -iv $PreprocessorGlobals($keyWord)"
>>      (procedure "CreatePreprocessorRenderWindow" line 20)
>>      invoked from within
>> "CreatePreprocessorRenderWindow $f "source""
>>      (procedure "ConstructPreprocessorFrame" line 82)
>>      invoked from within
>> "ConstructPreprocessorFrame .preprocessorFrame"
>>      ("eval" body line 1)
>>      invoked from within
>> "eval [subst $function_name] .$suffix"
>>      ("foreach" body line 8)
>>      invoked from within
>> "foreach m $Globals(module_names) {
>>      set suffix [string tolower $m]
>>      append suffix "Frame"
>>      frame .$suffix
>>      set function_name "Construct"
>>   ..."
>>      (file "Main.tcl" line 137)
>>
>> On 06.07.2012 16:22, Roman Grothausmann wrote:
>>> Dear mailing list members,
>>>
>>>
>>> I'm trying to run the SegmentationEditor
>>> (http://www.itk.org/ITK/applications/segmentationeditor.html)
>>>
>>> When I do as told in the SegmentationEditor-readme:
>>>
>>> export  TCLLIBPATH="/opt/vtk-5.8.0_dyn+py2.7+tcl/lib/vtk-5.8/tcl/
>>> /opt/vtk-5.8.0_dyn+py2.7+tcl/lib/vtk-5.8/tcl/vtkinteraction/"
>>>
>>>
>>> ~/sda8/programme/InsightApplications-4.1.1/SegmentationEditor/Scripts$
>>> ~/sda8/programme/InsightApplications-4.1.1/build_vtk-5.8.0/SegmentationEditor/Wrapping/Tcl/WSTITK
>>>
>>>
>>> Main.tcl
>>>
>>>
>>> I get this error:
>>>
>>> Error in startup script: can't find package vtkinteraction
>>>
>>> adding as told in the TCL/README:
>>>
>>> source /opt/vtk-5.8.0_dyn+py2.7+tcl/lib/vtk-5.8/tcl/vtk/vtk.tcl
>>> package require vtk
>>>
>>> results in:
>>>
>>> Error in startup script: can't read "vtk::init::kits": no such variable
>>>
>>> Google only finds one post which was not answered
>>> (http://www.vtk.org/pipermail/vtk-developers/2003-October/002591.html).
>>>
>>> Can anybody help me with this VTK|TCL problem?
>>>
>>> Any help or hints are very much appreciated
>>> Roman
>>>
>>
>

-- 
Roman Grothausmann

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Bereich Funktionale Materialien
Institut für angewandte Materialforschung
Hahn-Meitner-Platz 1
D-14109 Berlin	

(früher Hahn-Meitner-Institut und BESSY)


Tel.: +49-(0)30-8062-42816
Fax.: +49-(0)30-8062-43059

Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer
Sitz der Gesellschaft: Berlin
Handelsregister: AG Charlottenburg, 89 HRB 5583






More information about the vtkusers mailing list