<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 attempting to grab images from a real time source and store them in a vector. The problem that I'm having is that, when I later try to use the images in the vector, it returns the real time image of the source. An excerpt of my code is as follows.<br><br>//////////////////////////////////////////////////////////////////<br>typedef itk::Image< unsigned char, 2 > FixedImageType;<br>typedef itk::VTKImageToImageFilter<FixedImageType> VTKImageToITKImageType;<br><br>vector<FixedImageType::ConstPointer> ImagePanorama;<br><br> for (int i = 0; i < 10; i++)<br> {<br> USImage->SetScalarTypeToUnsignedChar();<br> USImage->SetDimensions(960,480,1);<br> USImage->SetSpacing(1,1,1);<br> USImage = sonixGrabber->GetOutput();<br> USImage->Update();<br><br> VTKToITKConnector->SetInput(USImage);<br> VTKToITKConnector->Update();<br> <br> FixedImageType::ConstPointer ITKImagePointer = VTKToITKConnector->GetOutput();<br> <br> ImagePanorama.push_back(ITKImagePointer);<br> Sleep(100);<br> }<br><br> for (vector<FixedImageType::ConstPointer>::iterator PanoramaIterator = ImagePanorama.begin();PanoramaIterator < ImagePanorama.end()-1;PanoramaIterator++)<br> {<br> FixedUSImage = *PanoramaIterator;<br> }<br>//////////////////////////////////////////////////////////////////<br><br>Specifically, the iterator doesn't seem to be referring to the series of images that I put into the vector earlier. Does anyone know why this is? Thank you all in advance.<br><br>Regards,<br>Alexis Cheng<br>Electrical Engineering<br>University of British Columbia<br>                                            </body>
</html>