<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>
<DIV>I have a point and a normal direction I would like to set up a linear equation which describes my line in normal direction. and then So I would like to calculate through which voxels (in 3D object) line goes. Is it possible to implement this by using vtk? </DIV>
<DIV> </DIV>
<DIV>here What I have done so far</DIV>
<DIV><FONT size=2>
<P><FONT size=3>vtkSTLReader *read = vtkSTLReader::New();</FONT></P>
<P></FONT><FONT size=3>read->SetFileName(<FONT color=#800000>"sample.stl"</FONT>);</FONT></P>
<P>read->Update();</P>
<P>vtkPolyData *Source=read->GetOutput();</P>
<P><FONT color=#0000ff>int</FONT> npts;</P>
<P>vtkPoints* stlpoints = Source->GetPoints();</P>
<P>npts = Source->GetNumberOfPoints();</P>
<P>vtkFloatingPointType stlpoint[3];</P>
<P>vtkFloatArray *PointArray = vtkFloatArray::New(); </P>
<P>PointArray->SetNumberOfComponents(3);</P>
<P>PointArray->SetNumberOfTuples(npts);</P>
<P><FONT color=#0000ff>for</FONT>(<FONT color=#0000ff>int</FONT> i =0; i < npts; ++i) </P>
<P>{</P>
<P>stlpoints->GetPoint(i, stlpoint);</P>
<P>PointArray->SetTuple(i, stlpoint);</P>
<P>}</P>
<P><FONT size=2>
<P><FONT size=3></FONT></P><FONT size=3>vtkPolyDataMapper *readmap=vtkPolyDataMapper::New();</FONT></P>
<P><FONT size=3>readmap->SetInput(Source);</FONT></P>
<P><FONT size=3>vtkPolyDataNormals *normals=vtkPolyDataNormals::New();</FONT></P>
<P><FONT size=3>normals->SetInput(Source);</FONT></P>
<P><FONT size=3>normals->SetFeatureAngle(60.0f);</FONT></P>
<P><FONT size=3>normals->Update();</FONT></P>
<P> </P>
<P> </P>
<P><STRONG><FONT color=#ff0000 size=4>In attachment what i would like to get can be easily seen (linear equation)</FONT></STRONG></P></FONT></DIV></DIV></div><br>
<hr size=1>Want to start your own business? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index">Yahoo! Small Business.</a></body></html>