<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br>Hi, Yadin, this fragment code should be useful for you:<br><br> vtkPoints points= new vtkPoints();<br> <br> vtkDoubleArray scalars = new vtkDoubleArray(); <br><br> // Here you put your data points<br><br> pontos.InsertPoint(0, x, y, z);<br> scalars.InsertNextValue(scalarvalue); // scalarvalue is the intensity like y said ok ;) <br> idConter++;<br><br> points.SetNumberOfPoints(30);<br> <br> vtkCellArray polys = new vtkCellArray();<br> polys.InsertNextCell(points.GetNumberOfPoints());<br> <br> for (int i=0; i <pontos.GetNumberOfPoints(); i++)<br> polys.InsertCellPoint(i);<br> <br> vtkPolyData polyData = new vtkPolyData();<br> polyData.SetPoints(points);<br> polyData.SetVerts(polys);<br> polyData.GetPointData().SetScalars(scalars);<br> <br></div> vtkPolyDataMapper mapper = new vtkPolyDataMapper();<br> mapper.SetInput(polyData);<br> mapper.SetScalarRange(polyData.GetScalarRange());<br> <br> vtkActor Actor = new vtkActor();<br> Actor.SetMapper(mapper);<br><br> vtkRenderer ren1 = new vtkRenderer();<br> vtkRenderWindow renWin = new vtkRenderWindow();<br> renWin.AddRenderer(ren1);<br> ren1.AddActor(Actor);<br> <br> <br> vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();<br> iren.SetRenderWindow(renWin);<br> renWin.Render();<br> iren.Start(); <br><br> Thats in java and its not complete, but y can have a idea, I wish y a good luck.<br> bye bye<br> Rafael<br><blockquote><hr id="EC_stopSpelling">Date: Thu, 6 Sep 2007 13:37:59 -0700<br>From: conra2004@yahoo.com<br>To: vtkusers@vtk.org<br>Subject: [vtkusers] intensity plot;<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><style>
.ExternalClass DIV
{;}
</style><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>hi!<br>i am planning to plot a contour map with vtk<br>i have 30 points as an array <br>x = [1,1.0,1.003......]<br>y = [0.03,1,3,4.5,.....]<br>z =[11.2,2.3,2.0,1.9,.....]<br>I ntensity= [0.2,34,5,,]<br>how can i do a plot of this points and then lets say use different colors at every point to represent
different intensities<br>thank you very much for helping me</div></div><br>__________________________________________________<br>Correo Yahoo!<br>Espacio para todos tus mensajes, antivirus y antispam ¡gratis! <br>Regístrate ya - http://correo.espanol.yahoo.com/ </blockquote><br /><hr />Encontre o que procura com mais eficiência! Instale já a Barra de Ferramentas com Windows Desktop Search GRÁTIS! <a href='http://desktop.msn.com.br/' target='_new'>Experimente já!</a></body>
</html>