<div dir="ltr"><div>Thank you for your reply! Yes I have tried using the vtkProbeFilter, this is the code:</div>
<div> </div><font face="courier new,monospace"></font><font face="courier new,monospace">
<div><font face="courier new,monospace">  //Read volume<br>  std::string inputFilename = &quot;volume.mhd&quot;;</font></div>
<div><font face="courier new,monospace">  vtkSmartPointer&lt;vtkMetaImageReader&gt; reader = vtkSmartPointer&lt;vtkMetaImageReader&gt;::New();<br>  reader-&gt;SetFileName(inputFilename.c_str());<br>  reader-&gt;Update();</font></div>


<div> </div>
<div>  // Read points<br>  std::string filename = argv[1];<br>  std::ifstream fin(filename.c_str());<br> <br>  std::string line;<br>  vtkSmartPointer&lt;vtkPoints&gt; points = vtkSmartPointer&lt;vtkPoints&gt;::New();<br>

  while(std::getline(fin, line))<br>  {<br>    double x,y,z;<br>    std::stringstream linestream;<br>    linestream &lt;&lt; line;<br>    linestream &gt;&gt; x &gt;&gt; y &gt;&gt; z;<br> <br>    points-&gt;InsertNextPoint(x, y, z);<br>

  }<br> <br>  fin.close();<br> <br>  // Polydata</div>
<div>  vtkSmartPointer&lt;vtkPolyData&gt; polydata = vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>  polydata-&gt;SetPoints(points);</div>
<div> </div>
<div></div></font><font face="courier new,monospace">  // Probe Filter<br>  vtkSmartPointer&lt;vtkProbeFilter&gt; probe = vtkSmartPointer&lt;vtkProbeFilter&gt;::New();<br>  probe-&gt;SetSource(reader-&gt;GetOutput());<br>

  probe-&gt;SetInput(polydata);<br>  probe-&gt;Update();</font></div>
<div> </div>
<div><font face="arial,helvetica,sans-serif"></font>Regarding this code, I have 3 questions (other than &quot;is it correct?&quot; of course):</div>
<ol>
<li>&#39;points&#39; are the points to sample the volume at. There are 10,000 sampling points that should output a 100x100 2D image. However, I didn&#39;t use this information anywhere which is probably incorrect since 10,000 points can also produce 50x200 2D image. How should it be done?</li>


<li>How can I render the resulted 2D image?</li>
<li>The probing (&#39;<font face="Courier New">probe-&gt;Update()</font><font face="arial,helvetica,sans-serif">&#39;) takes quite a lot of time (~400ms), while I need this action to be much faster since it&#39;s intended to be interactive. How can I speed things up? Maybe using <font size="2">vtkStructuredGrid will be faster?</font></font></li>

</ol>
<div>Thank you so much,</div>
<div>Eyal.</div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Wed, Sep 14, 2011 at 2:25 PM, peterm <span dir="ltr">&lt;<a href="mailto:madapeti@gmail.com" target="_blank">madapeti@gmail.com</a>&gt;</span> wrote:<br></div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hello<br><br>Did you try using the vtkProbeFilter for sampling from the grayscale volume?<br>You can find some examples about probing along lines and planes in the VTK<br>

example code.<br><br>--<br>View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Creating-Curved-MPR-Image-tp4802388p4802571.html" target="_blank">http://vtk.1045678.n5.nabble.com/Creating-Curved-MPR-Image-tp4802388p4802571.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>

<br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>

</blockquote><br>