[vtkusers] Cell data visualization for meshes made of parabolic tetra in vtk4.2 is crashing the application

stefano perticoni stefano.perticoni at virgilio.it
Sun Oct 24 19:53:27 EDT 2004


Dear vtk users,

I'm trying to visualize cell data for meshes made of parabolic tetra with
vtk 4.2. Cell data visualization is crashing the application while point
data displaying is ok. Here is a little test program with some test data to
replicate the problem. To replicate the crash uncomment the "# PDM
SetScalarMode 2" line and comment the  "# PDM SetScalarMode 0" line.
Please let me know if I'm doing some mistakes trying to visualize this data.

Regards,
Stefano Perticoni

# -------------------------------------
#   test program
# -------------------------------------


package require vtk
package require vtkinteraction
package require vtktesting

vtkRenderer R
   R SetBackground 0.5 0.5 0.5 
   R SetLightFollowCamera 1

vtkRenderWindow RW
   RW AddRenderer R
   RW AddRenderer R
   RW SetSize 500 451 

vtkRenderWindowInteractor RWI
   RWI SetRenderWindow RW
   RWI SetLightFollowCamera 1

vtkUnstructuredGridReader UGR
   UGR SetFileName 2Tetra10Nodes.vtk

vtkDataSetSurfaceFilter DSSF
   DSSF SetInput [UGR GetOutput]
   DSSF SetUseStrips 0

vtkPolyDataMapper PDM
   PDM SetInput [DSSF GetOutput]
   PDM SetNumberOfPieces 1
   PDM SetScalarRange 0 1 
   PDM SetColorMode 0
   PDM SetResolveCoincidentTopology 0
   PDM SetScalarMode 0
   # -------------------------------------
   # Why set scalar mode to use cell data is crashing the pipeline ??
   # -------------------------------------
   # PDM SetScalarMode 2	

   PDM SetImmediateModeRendering 0
   PDM SetScalarVisibility 1
   PDM SetUseLookupTableScalarRange 0

vtkActor A
   A SetMapper PDM
   A SetOrigin 0 0 0 
   A SetPosition 0 0 0 
   A SetScale 1 1 1 
   A SetPickable 1
   A SetVisibility 1

   R AddActor A

R ResetCamera
R ResetCameraClippingRange
RW Render
#RWI Start

;# To enable a console, uncomment next line
#console show
wm withdraw .

update


# -------------------------------------
#   test data  2Tetra10Nodes.vtk
# -------------------------------------

# vtk DataFile Version 2.0 
Vtk Unstructured Grid input file for fem 
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 14 float
10.0000000000       10.0000000000       0.00000000000    
5.00000000000       5.00000000000       0.00000000000    
10.0000000000       5.00000000000       5.00000000000    
5.00000000000       10.0000000000       5.00000000000    
7.50000000000       7.50000000000       0.00000000000    
7.50000000000       5.00000000000       2.50000000000    
10.0000000000       7.50000000000       2.50000000000    
7.50000000000       10.0000000000       2.50000000000   
5.00000000000       7.50000000000       2.50000000000    
7.50000000000       7.50000000000       5.00000000000    
4.99983835220       4.99983835220       4.99983835220    
4.99991917610       7.49991917610       4.99991917610    
4.99991917610       4.99991917610       2.49991917610    
7.49991917610       4.99991917610       4.99991917610    

CELLS 2 22
10 0 1 2 3 4 5 6 7 8 9
10 3 1 2 10 8 5 9 11 12 13

CELL_TYPES 2
24
24

POINT_DATA 14 
SCALARS scalars float 1
LOOKUP_TABLE default
0
0.5
0.7
0.1
0
0.5
0.7
0.1
0
0.5
0
0.5
0.7
0.1

CELL_DATA 2 
SCALARS scalars float 1
LOOKUP_TABLE default
0.2
0.5

# -------------------------------------







More information about the vtkusers mailing list