<!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> </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> </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> </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> vtkPoints * pts =
vtkPoints::New();<BR> vtkCellArray * ca = vtkCellArray::New();<BR>
vtkPolyData * pd = vtkPolyData::New();<BR> vtk<SPAN
class=355490422-21102003>Float</SPAN>Array * scalars = vtk<SPAN
class=355490422-21102003>Float</SPAN>Array ::New();<BR>vtkPolyDataMapper * m =
vtkPolyDataMapper::New();<BR> vtkLookupTable *lut =
vtkLookupTable::New();</DIV>
<DIV>vtkRenderer* ren = vtkRenderer::New();<BR> vtkActor * a =
vtkActor::New();<BR><BR> lut->SetNumberOfColors(<SPAN
class=355490422-21102003>N</SPAN>);<BR>
lut->Build();<BR> for (i=0; i<<SPAN
class=355490422-21102003>N</SPAN>; ++i)
lut->SetTableValue(i, <SPAN
class=355490422-21102003>R</SPAN>[i], <SPAN
class=355490422-21102003>G</SPAN>[i], <SPAN
class=355490422-21102003>B</SPAN>[i], <SPAN
class=355490422-21102003>A[i]</SPAN>);<BR></DIV>
<DIV><FONT face=Arial color=#008000></FONT><BR> for (i=0;i<<SPAN
class=355490422-21102003>n</SPAN>;i++)<BR>
{<BR> pts->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>
ca->InsertNextCell(1);<BR>
ca->InsertCellPoint(i);<BR>
scalars->InsertNextTuple1(<SPAN
class=355490422-21102003>f[i]</SPAN>);<BR> }<BR>
pd->SetPoints(pts);<BR> pd->SetVerts(ca);<BR>
pd->GetPointData()->SetScalars(scalars);<BR><BR>
m->SetLookupTable(lut);<BR> m->SetInput(pd);<BR>
m->SetScalarRange(<SPAN class=355490422-21102003>ScalarMin</SPAN>, <SPAN
class=355490422-21102003>ScalarMax</SPAN>);<BR><BR>
a->SetMapper(m);<BR> a->GetProperty()->SetPointSize(8);<BR>
ren->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> </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> </DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial
color=#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=355490422-21102003><FONT face=Arial
color=#008000></FONT></SPAN> </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> </DIV>
<DIV>At the moment I use vtkFloatArray -> vtkImageData
-> vtkImageViewer..</DIV>
<DIV>(and FloatArray sets up the lookup table)</DIV>
<DIV> </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> </DIV>
<DIV>okay thank u again vtkusers</DIV>
<DIV> </DIV>
<DIV>one day i'll be the expert..!</DIV>
<DIV> </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>