<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi all,<br><br>I'm creating an image using vtkImageCanvasSource2D and need to draw multiple lines within the image. I'm able to do this using the DrawSegment/FillTube functions. My problem is that when I try to draw multiple lines in a loop, it only displays 1 line in the final image.<br><br>//////////<br>vtkSmartPointer&lt;vtkImageCanvasSource2D&gt; imageLine = vtkSmartPointer&lt;vtkImageCanvasSource2D&gt;::New();<br>imageLine-&gt;SetScalarTypeToUnsignedChar();<br>imageLine-&gt;SetExtent(MTImage-&gt;GetExtent());<br>imageLine-&gt;SetNumberOfScalarComponents(1);<br>imageLine-&gt;SetDrawColor(0,255,0);<br><br>for (int i = 0; i &lt; EP1Vector2Dx.size(); i++)<br>{<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageLine-&gt;FillTube(*EP1Vector2Dx.at(i),960 - *EP1Vector2Dy.at(i), *EP2Vector2Dx.at(i), 960 - *EP2Vector2Dy.at(i),1);<br>}<br>imageLine-&gt;Update();<br>//////////<br><br>This for loop will only create a single line. Note that it will draw multiple lines if I expand the for loop into individual statements. I think I'm misunderstanding how the pipelines work. Is there a way to implement a for loop within the pipeline? Thank you all in advance.<br><br>Regards,<br>Alexis Cheng<br>Electrical Engineering<br>University of British Columbia<br>                                               </body>
</html>