Hi Lisa,

Thanks for your answer.

Two comments:
First, If you translate one of the data set (not the actor but the data set), the problem persists. Doesn't this mean that this is a bug not a feature?

Secondly, you only see this problem when using "SetRepresentationToPoints", not for wire frames or surfaces.

I've uploaded the data set (DBE-1time.vtk ) to  ftp://128.113.5.234/incoming/ . Please try the script (attached in the previous mail), in order to see the problem for yourself.

Lastly, I would like to use this opportunity to thank you all at Kitware, you're doing a great job with VTK.

Best regards,
Per

"Lisa S. Avila" wrote:

 Hello Per,

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.

Lisa

At 09:31 AM 1/26/00 +0100, Per Rønsholt Andresen wrote:

Hi VTK mailing list,

I've found a bug in VTK (nightly release from today - but also found in i release from two weeks ago).

By switching the two lines (see script)

ren1 AddActor actor_2;
ren1 AddActor actor_1;

to

ren1 AddActor actor_1;
ren1 AddActor actor_2;

you get two different visualizations (see files s1.jpg and s2.jpg - http://www.imm.dtu.dk/~pra/s1.jpg  and http://www.imm.dtu.dk/~pra/s2.jpg ). I've only seen this problem together with
'SetRepresentationToPoints'. Somehow the light becomes 'flat' ???

I've used to following tcl-script:

===============BEGIN SCRIPT====================

source $env(HOME)/source/tcl/TkInteractor.tcl

wm withdraw .
toplevel .top
frame .top.f1

vtkTkRenderWidget .top.f1.r1 -width 600 -height 600
    BindTkRenderWidget .top.f1.r1

button .top.btn  -text Quit -command exit

pack .top.f1.r1 -side left -padx 3 -pady 3 -fill both -expand t
pack .top.f1  -fill both -expand t
pack .top.btn -fill x

# Get the render window associated with the widget.
set renWin1 [.top.f1.r1 GetRenderWindow]
vtkRenderer ren1;

$renWin1 AddRenderer ren1;

vtkPolyDataReader reader
reader SetFileName DBE-1time.vtk; # <----- FILE with contour lines (laser scan) 3D points connect with 'LINES'

vtkPolyDataMapper map_1
  map_1 SetInput [reader GetOutput]
vtkActor actor_1
  actor_1 SetMapper map_1;

vtkSurfaceReconstructionFilter recon
  recon SetInput [reader  GetOutput]
  recon SetSampleSpacing 0.5

vtkMarchingCubes mc
  mc SetInput [recon GetOutput]

vtkPolyDataMapper map_2
  map_2 SetInput [mc GetOutput]
vtkActor actor_2
  actor_2 SetMapper map_2;

ren1 AddActor actor_2; # <--- Switch 1 and 2
ren1 AddActor actor_1;

ren1 SetBackground 1.0 1.0 1.0
$renWin1 SetSize 400 400

[actor_1 GetProperty] SetRepresentationToPoints

============END SCRIPT=================
 

Software: VTK from today (nighly release)
Hardware: SGI R12k Octane
Compiler: MIPSpro Compilers: Version 7.2.1.3m
Flags used:
    USER_CFLAGS=-mips4 -n32 -O2 -OPT:Olimit=10000
    USER_CXXFLAGS=-mips4 -n32 -O2 -OPT:Olimit=10000
Tcl/Tk: Version 8.0.5

Best wishes,
Per

-- 
______________________________________________________________
Per Roensholt Andresen              http://www.imm.dtu.dk/~pra
Assistant Research Professor, Ph.D.
Technical University of Denmark
 
----------------------------------------------------------------------------- This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to. For help, send message body containing "info vtkusers" to the same address. Live long and prosper. -----------------------------------------------------------------------------
-- 
______________________________________________________________
Per Roensholt Andresen              http://www.imm.dtu.dk/~pra
Assistant Research Professor, Ph.D.
Technical University of Denmark
 
Content-Type: text/x-vcard; charset=us-ascii; name="pra.vcf" Content-Description: Card for Per Rønsholt Andresen Content-Disposition: attachment; filename="pra.vcf" X-MIME-Autoconverted: from 8bit to quoted-printable by unknown-147-100.pilot.net id AAA23279 Attachment Converted: "c:\program files\qualcomm\eudora mail\attach\pra6.vcf"