<font><font face="verdana,sans-serif">well, approximately like this:</font></font><div><ul><li><span style="font-family:verdana,sans-serif">clear image (set all pixels to zero)</span></li><li><span style="font-family:verdana,sans-serif">for x=0 to image.size(0)</span></li>

<li><span style="font-family:verdana,sans-serif">y=m*x+c</span></li><li><span style="font-family:verdana,sans-serif">if y&gt;=</span><span style="font-family:verdana,sans-serif">image.size(0) OR y&lt;0 continue;</span></li>

<li><span style="font-family:verdana,sans-serif">else image.setpixel(x,y,1)</span></li><li><span style="font-family:verdana,sans-serif">next x</span></li></ul><font face="verdana, sans-serif">For parabola, you need to explicitly solve it for y to use above approach, or solve for x and iterate over y and calculate x.</font></div>

<div><font face="verdana, sans-serif">This approach doesn&#39;t do anti-aliasing, of course. If you need anti-aliasing, you can use <a href="http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm">Xiaolin Wu&#39;s algorithm</a>.<br>

</font><br><div class="gmail_quote">On Fri, Oct 12, 2012 at 10:57 AM, Raviteja, Allaparthi <span dir="ltr">&lt;<a href="mailto:Allaparthi.Raviteja@philips.com" target="_blank">Allaparthi.Raviteja@philips.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I have been stuck with the problem of drawing a parabola of the form  ((y-k)*(y-k))=4a(x-h) and drawing a line of the form y=mx+c  into an image in ITK  .Could someone please help me out .</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">Ravi Teja.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
 that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>


</font>
</div>

<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<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>