<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=355490422-21102003><FONT face=Arial color=#008000>Hi 
Alan,</FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial color=#008000>To become an 
expert vtkuser, Check out this post</FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial color=#008000><A 
href="http://public.kitware.com/pipermail/vtkusers/2003-September/020191.html">http://public.kitware.com/pipermail/vtkusers/2003-September/020191.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial color=#008000>As a 
beginning vtkuser, I rendered colored points with this kind of 
pipeline.</FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT face=Arial color=#008000><SPAN 
class=355490422-21102003>......</SPAN></FONT></DIV><FONT face=Arial 
color=#008000></FONT>
<DIV><FONT face=Arial color=#008000></FONT><BR>&nbsp; vtkPoints * pts = 
vtkPoints::New();<BR>&nbsp; vtkCellArray * ca = vtkCellArray::New();<BR>&nbsp; 
vtkPolyData * pd = vtkPolyData::New();<BR>&nbsp; vtk<SPAN 
class=355490422-21102003>Float</SPAN>Array * scalars = vtk<SPAN 
class=355490422-21102003>Float</SPAN>Array ::New();<BR>vtkPolyDataMapper * m = 
vtkPolyDataMapper::New();<BR>&nbsp;vtkLookupTable *lut = 
vtkLookupTable::New();</DIV>
<DIV>vtkRenderer* ren = vtkRenderer::New();<BR>&nbsp; vtkActor&nbsp; * a = 
vtkActor::New();<BR><BR>&nbsp;&nbsp;&nbsp; lut-&gt;SetNumberOfColors(<SPAN 
class=355490422-21102003>N</SPAN>);<BR>&nbsp;&nbsp;&nbsp; 
lut-&gt;Build();<BR>&nbsp;&nbsp;&nbsp; for (i=0; i&lt;<SPAN 
class=355490422-21102003>N</SPAN>; ++i)&nbsp; 
lut-&gt;SetTableValue(i,&nbsp;<SPAN 
class=355490422-21102003>R</SPAN>[i],&nbsp;<SPAN 
class=355490422-21102003>G</SPAN>[i],&nbsp;<SPAN 
class=355490422-21102003>B</SPAN>[i],&nbsp;<SPAN 
class=355490422-21102003>A[i]</SPAN>);<BR></DIV>
<DIV><FONT face=Arial color=#008000></FONT><BR>&nbsp; for (i=0;i&lt;<SPAN 
class=355490422-21102003>n</SPAN>;i++)<BR>&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pts-&gt;InsertNextPoint(<SPAN 
class=355490422-21102003>x</SPAN>[i],<SPAN class=355490422-21102003> 
</SPAN><SPAN class=355490422-21102003>y</SPAN>[i],<SPAN 
class=355490422-21102003> </SPAN><SPAN 
class=355490422-21102003>z</SPAN>[i]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
ca-&gt;InsertNextCell(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
ca-&gt;InsertCellPoint(i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
scalars-&gt;InsertNextTuple1(<SPAN 
class=355490422-21102003>f[i]</SPAN>);<BR>&nbsp; }<BR>&nbsp; 
pd-&gt;SetPoints(pts);<BR>&nbsp; pd-&gt;SetVerts(ca);<BR>&nbsp; 
pd-&gt;GetPointData()-&gt;SetScalars(scalars);<BR><BR>&nbsp;&nbsp; 
m-&gt;SetLookupTable(lut);<BR>&nbsp; m-&gt;SetInput(pd);<BR>&nbsp; 
m-&gt;SetScalarRange(<SPAN class=355490422-21102003>ScalarMin</SPAN>,&nbsp;<SPAN 
class=355490422-21102003>ScalarMax</SPAN>);<BR><BR>&nbsp;&nbsp;&nbsp; 
a-&gt;SetMapper(m);<BR>&nbsp; a-&gt;GetProperty()-&gt;SetPointSize(8);<BR>&nbsp; 
ren-&gt;AddActor(a);</DIV>
<DIV><SPAN class=355490422-21102003></SPAN>.<SPAN 
class=355490422-21102003>...</SPAN><BR></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000>HTH</FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000>Yang</FONT></SPAN></DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial 
color=#008000></FONT></SPAN>&nbsp;</DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma 
size=2>-----Original Message-----<BR><B>From:</B> alan . 
[mailto:lost_bits1110@hotmail.com] <BR><B>Sent:</B> Tuesday, October 21, 2003 
4:59 PM<BR><B>To:</B> vtkusers@vtk.org<BR><B>Subject:</B> [vtkusers] lookup 
table with imageviewer and floatarray (2)<BR><BR></FONT></DIV>
<DIV>
<DIV>Or if theres another way to execute the pipeline..</DIV>
<DIV>&nbsp;</DIV>
<DIV>At the moment&nbsp;I use vtkFloatArray -&gt; &nbsp;vtkImageData 
-&gt;&nbsp;vtkImageViewer..</DIV>
<DIV>(and FloatArray sets up the lookup table)</DIV>
<DIV>&nbsp;</DIV>
<DIV>but maybe the vtkImageViewer is the problem, so i can create a 
vtkDataSetMapper, which takes in the vtkImageData</DIV>
<DIV>but then how do I render this..? I dont have any actors - just a bunch of 
points (which came from a file of numbers)</DIV>
<DIV>&nbsp;</DIV>
<DIV>okay thank u again vtkusers</DIV>
<DIV>&nbsp;</DIV>
<DIV>one day i'll be the expert..!</DIV>
<DIV>&nbsp;</DIV>
<DIV>-alan.</DIV></DIV><BR clear=all>
<HR>
<A href="http://g.msn.com/8HMAENUS/2728??PS=">Never get a busy signal because 
you are always connected with high-speed Internet access. Click here to 
comparison-shop providers.</A> _______________________________________________ 
This is the private VTK discussion list. Please keep messages on-topic. Check 
the FAQ at: <HTTP: vtkfaq cgi-bin public.kitware.com>Follow this link to 
subscribe/unsubscribe: 
http://www.vtk.org/mailman/listinfo/vtkusers</BODY></HTML>