<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<vtkImageCanvasSource2D> imageLine = vtkSmartPointer<vtkImageCanvasSource2D>::New();<br>imageLine->SetScalarTypeToUnsignedChar();<br>imageLine->SetExtent(MTImage->GetExtent());<br>imageLine->SetNumberOfScalarComponents(1);<br>imageLine->SetDrawColor(0,255,0);<br><br>for (int i = 0; i < EP1Vector2Dx.size(); i++)<br>{<br> imageLine->FillTube(*EP1Vector2Dx.at(i),960 - *EP1Vector2Dy.at(i), *EP2Vector2Dx.at(i), 960 - *EP2Vector2Dy.at(i),1);<br>}<br>imageLine->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>