<x-html>
<html>
Hello Per,<br>
<br>
I think the problem is that you are looking at two actors whose data lie
on top of each other - what gets displayed in a pixel depends on which
actor you draw first (or maybe last, I am not sure if the z operation is
"less than" or "less than or equal to"). The surface
actor (actor2) is drawn with shading while the one drawn as points
(actor1) is not - hence the two different images that you see. <br>
<br>
Lisa<br>
<br>
At 09:31 AM 1/26/00 +0100, Per Rønsholt Andresen wrote: <br>
<blockquote type=cite cite>Hi VTK mailing list, <br>
<br>
I've found a bug in VTK (nightly release from today - but also found in i
release from two weeks ago). <br>
<br>
By switching the two lines (see script) <br>
<br>
ren1 AddActor actor_2; <br>
ren1 AddActor actor_1; <br>
<br>
to <br>
<br>
ren1 AddActor actor_1; <br>
ren1 AddActor actor_2; <br>
<br>
you get two different visualizations (see files s1.jpg and s2.jpg -
<a href="http://www.imm.dtu.dk/~pra/s1.jpg">http://www.imm.dtu.dk/~pra/s1.jpg</a>
and
<a href="http://www.imm.dtu.dk/~pra/s2.jpg">http://www.imm.dtu.dk/~pra/s2.jpg</a>
). I've only seen this problem together with <br>
'SetRepresentationToPoints'. Somehow the light becomes 'flat' ??? <br>
<br>
I've used to following tcl-script: <br>
<br>
===============BEGIN SCRIPT==================== <br>
<br>
source $env(HOME)/source/tcl/TkInteractor.tcl <br>
<br>
wm withdraw . <br>
toplevel .top <br>
frame .top.f1 <br>
<br>
vtkTkRenderWidget .top.f1.r1 -width 600 -height 600 <br>
BindTkRenderWidget .top.f1.r1 <br>
<br>
button .top.btn -text Quit -command exit <br>
<br>
pack .top.f1.r1 -side left -padx 3 -pady 3 -fill both -expand t <br>
pack .top.f1 -fill both -expand t <br>
pack .top.btn -fill x <br>
<br>
# Get the render window associated with the widget. <br>
set renWin1 [.top.f1.r1 GetRenderWindow] <br>
vtkRenderer ren1; <br>
<br>
$renWin1 AddRenderer ren1; <br>
<br>
vtkPolyDataReader reader <br>
reader SetFileName DBE-1time.vtk; # <----- FILE with contour lines (laser scan) 3D points connect with 'LINES' <br>
<br>
vtkPolyDataMapper map_1 <br>
map_1 SetInput [reader GetOutput] <br>
vtkActor actor_1 <br>
actor_1 SetMapper map_1; <br>
<br>
vtkSurfaceReconstructionFilter recon <br>
recon SetInput [reader GetOutput] <br>
recon SetSampleSpacing 0.5 <br>
<br>
vtkMarchingCubes mc <br>
mc SetInput [recon GetOutput] <br>
<br>
vtkPolyDataMapper map_2 <br>
map_2 SetInput [mc GetOutput] <br>
vtkActor actor_2 <br>
actor_2 SetMapper map_2; <br>
<br>
ren1 AddActor actor_2; # <--- Switch 1 and 2 <br>
ren1 AddActor actor_1; <br>
<br>
ren1 SetBackground 1.0 1.0 1.0 <br>
$renWin1 SetSize 400 400 <br>
<br>
[actor_1 GetProperty] SetRepresentationToPoints <br>
<br>
============END SCRIPT================= <br>
<br>
<br>
Software: VTK from today (nighly release) <br>
Hardware: SGI R12k Octane <br>
Compiler: MIPSpro Compilers: Version 7.2.1.3m <br>
Flags used: <br>
USER_CFLAGS=-mips4 -n32 -O2 -OPT:Olimit=10000 <br>
USER_CXXFLAGS=-mips4 -n32 -O2 -OPT:Olimit=10000 <br>
Tcl/Tk: Version 8.0.5 <br>
<br>
Best wishes, <br>
Per <br>
<pre>--
______________________________________________________________
Per Roensholt Andresen <a href="http://www.imm.dtu.dk/~pra">http://www.imm.dtu.dk/~pra</a>
Assistant Research Professor, Ph.D.
Technical University of Denmark</pre>
<font size=3> </blockquote><br>
</font>
<BR>
</html>
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo@gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
</x-html>