🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #2417

Color Mapping (VTK)

#2417
From: DyXin
Date: Wed, 16 Jun 2004 03:29
59 lines
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-
Technical Details
Message-ID: <3ffvc0tchvmhdr5b7ovtu1ip15jblotjv6@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!skynet.be!skynet.be!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,1ba4030cf044eecc,start
X-Google-Thread: f73d3,a579a1bbd735f1fc,start
X-Google-Thread: 107324,9a62d2fbe538ad0,start
X-Google-Attributes: gidfcea4,gidf73d3,gid107324,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!skynet.be!skynet.be!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mail
From: DyXin <NoSP@M.Be>
Newsgroups: be.comp.programming,be.graphics,nm.comp.grafisch,nl.comp.programmeren
Subject: Color Mapping (VTK)
Message-ID: <3ffvc0tchvmhdr5b7ovtu1ip15jblotjv6@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 59
Date: Wed, 16 Jun 2004 03:29:41 GMT
NNTP-Posting-Host: 213.119.165.242
X-Complaints-To: abuse@telenet.be
X-Trace: hestia.telenet-ops.be 1087356581 213.119.165.242 (Wed, 16 Jun 2004 05:29:41 CEST)
NNTP-Posting-Date: Wed, 16 Jun 2004 05:29:41 CEST
Organization: Telenet Internet