Thread View: be.comp.programming
1 messages
1 total messages
Started by DyXin
Wed, 16 Jun 2004 03:29
Color Mapping (VTK)
Author: DyXin
Date: Wed, 16 Jun 2004 03:29
Date: Wed, 16 Jun 2004 03:29
59 lines
2399 bytes
2399 bytes
Ik heb een probleempje met color mapping in vtk... In plaats van
verschillende kleuren krijg ik een volledig rood object...
Ik weet niet goed wat ik fout doe (ben nog maar zeer recent met vtk
begonnen)...
Kan iemand me helpen?
Thnx a lot!
Dit is (een deel van) de code:
vtkUnstructuredGrid dataSet
vtkPoints pts
vtkFloatArray scalars
.........
while { ![eof $file] } {
# Read a line from the file and analyse it.
scan $line "%f %f %f %f" v1 v2 v3 v4
set line [gets $file]
pts InsertNextPoint $v1 $v2 $v3
# 0 < v4 < 250
scalars InsertNextValue $v4
}
dataSet SetPoints pts
[dataSet GetPointData] SetScalars scalars
.........
vtkGaussianSplatter popSplatter
popSplatter SetInput dataSet
popSplatter SetSampleDimensions 50 50 50
popSplatter SetRadius 0.05
popSplatter ScalarWarpingOff
vtkContourFilter popSurface
popSurface SetInput [popSplatter GetOutput]
popSurface SetValue 0 0.01
vtkPolyDataMapper popMapper
popMapper SetInput [popSurface GetOutput]
popMapper ScalarVisibilityOn
vtkActor actor
actor SetMapper popMapper
[actor GetProperty] SetOpacity 0.3
[actor GetProperty] SetColor .9 .9 .9
.........
mvg,
DyXin
"Regression testing"? What's that?
If it compiles, it is good, if it boots up it is perfect.
-Linus Torvalds, right before release of Linux 2.1.94-
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads