[Insight-users] AntiAliasBinaryImageFilter - ViewOutputVTK prob
Martin Styner
martin_styner@ieee.org
Mon, 21 Oct 2002 10:23:38 +0200
This is a multi-part message in MIME format.
--Boundary_(ID_5YIBa7CeLUlWPnUcjZbYug)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
Hi Josh, John
I had the same problem. I changed the vtk tcl script (it works). I've
attached it to the email.
Regards
Martin
Joshua Cates wrote:
> Hi,
>
> I've not touched this example in a while. I'll have a look and update it.
>
> Thanks,
>
> Josh.
>
> ______________________________
> Josh Cates
> School of Computer Science
> University of Utah
> Email: cates@sci.utah.edu
> Phone: (801) 587-7697
> URL: www.cs.utk.edu/~cates
>
>
> On Thu, 17 Oct 2002 anast.jm@pg.com wrote:
>
>
>>In the example, the ViewOutputVTK.tcl script seems to be missing a "package
>>require vtk" to get it to run (at least on my system).
>>
>>In addition I'm using vtk4.1.1 of 9/3/2002 (r1.1326) and the script
>>ViewOutputVTK4.1.1.tcl gives the following error.
>>
>>vtkTkRenderWidget Unknown option: GetImageViewer
>>Try: configure or GetRenderWindow
>>while executing
>>"$vtkiw GetImageViewer"
>>(procedure "::vtk::bind_tk_imageviewr_widget" line 3)
>>etc.
>>
>>I'm not real familiar with the TKRenderWidgets so this is just a heads up....the
>>non-vtk4.1.1 version works fine
>>
>>fyi...john
>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users@public.kitware.com
>>http://public.kitware.com/mailman/listinfo/insight-users
>>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
--
Martin Styner, PhD. Ing. ETH
Group Head Medical Image Analysis for Orthopiaedics
M.E. Mueller Institute for Biomechanics
Center for Computed Assisted Surgery
University of Bern
Murtenstrasse 35
P.O.Box 30
CH - 3010 Bern
Switzerland
Tel office: ++41-31-632-0940 , FAX: ++41-31-632-4951
email: Martin.Styner@memot.unibe.ch, martin_styner@ieee.org
WWW: http://cranium.unibe.ch/~mstyner
--Boundary_(ID_5YIBa7CeLUlWPnUcjZbYug)
Content-type: text/plain; name=ViewOutputVTK4.1.1.tcl
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=ViewOutputVTK4.1.1.tcl
# Copyright (c) 2002 Insight Consortium. All rights reserved.
# See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the above copyright notices for more information.
package require vtk
package require vtkinteraction
set X 255
set Y 255
set Z 255
set img_data1 "seg_snake.raw"
set img_data2 "seg_snake_L.raw"
vtkImageReader imgReader1
imgReader1 SetDataExtent 0 $X 0 $Y 0 $Z
imgReader1 SetFileName $img_data1
imgReader1 SetDataByteOrderToLittleEndian
imgReader1 SetNumberOfScalarComponents 1
imgReader1 SetFileDimensionality 3
imgReader1 SetDataScalarTypeToUnsignedChar
vtkMarchingCubes marcher1
marcher1 SetNumberOfContours 1
marcher1 SetValue 0 1.0
marcher1 SetInput [imgReader1 GetOutput]
vtkOpenGLPolyDataMapper map1
map1 ScalarVisibilityOff
map1 ImmediateModeRenderingOn
map1 SetInput [marcher1 GetOutput]
vtkRenderer ren1
ren1 SetViewport 0 0 1 1
vtkRenderWindow renWin1
renWin1 AddRenderer ren1
renWin1 SetSize 256 256
vtkRenderWindowInteractor iren1
iren1 SetRenderWindow renWin1
vtkActor blob1
blob1 SetMapper map1
eval [blob1 GetProperty] SetColor 1.0 0.8 0.5
ren1 AddActor blob1
iren1 AddObserver UserEvent {wm deiconify .vtkInteract}
iren1 Initialize
vtkImageReader imgReader2
imgReader2 SetDataExtent 0 $X 0 $Y 0 $Z
imgReader2 SetFileName $img_data2
imgReader2 SetDataByteOrderToLittleEndian
imgReader2 SetNumberOfScalarComponents 1
imgReader2 SetFileDimensionality 3
imgReader2 SetDataScalarTypeToFloat
vtkMarchingCubes marcher2
marcher2 SetNumberOfContours 1
marcher2 SetValue 0 0.0
marcher2 SetInput [imgReader2 GetOutput]
vtkOpenGLPolyDataMapper map2
map2 ScalarVisibilityOff
map2 ImmediateModeRenderingOn
map2 SetInput [marcher2 GetOutput]
vtkRenderer ren2
ren2 SetViewport 0 0 1 1
vtkRenderWindow renWin2
renWin2 AddRenderer ren2
renWin2 SetSize 256 256
vtkRenderWindowInteractor iren2
iren2 SetRenderWindow renWin2
vtkActor blob2
blob2 SetMapper map2
eval [blob2 GetProperty] SetColor 1.0 0.8 0.5
ren2 AddActor blob2
ren2 SetActiveCamera [ren1 GetActiveCamera]
iren2 AddObserver UserEvent {wm deiconify .vtkInteract}
iren2 Initialize
renWin1 Render
renWin2 Render
wm withdraw .
--Boundary_(ID_5YIBa7CeLUlWPnUcjZbYug)--