<div class="gmail_quote">Disconnect the image from the pipeline, or it will be subject to updates when you call Update() or update any of the downstream filters like the VTK-ITK connector... This is done with a shallow copy.<br>
<br>ie Instead of :<br><br>                    USImageStitch = sonixGrabber-&gt;GetOutput();<br>                    USImageStitch-&gt;Update();<br><br>write<br><br>  sonixGrabber-&gt;Update();<br>  USImageStich-&gt;ShallowCopy(sonixGrabber-&gt;GetOutput());<br>
  <br>  <br><br><br>On Tue, Feb 15, 2011 at 4:18 AM, Alexis Cheng <span dir="ltr">&lt;<a href="mailto:acheng_1221@hotmail.com">acheng_1221@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<br>                    vtkSmartPointer&lt;vtkImageData&gt; USImageStitch = vtkSmartPointer&lt;vtkImageData&gt;::New();<br>                    USImageStitch-&gt;SetScalarTypeToUnsignedChar();<br>                    USImageStitch-&gt;SetDimensions(640,480,1);<br>
                    USImageStitch-&gt;SetSpacing(1,1,1);<br>                    USImageStitch = sonixGrabber-&gt;GetOutput();<br>                    USImageStitch-&gt;Update();<br>                        <br>                    ImagePanorama.push_back(USImageStitch);<br>
                    Sleep(100);<br>                }<br><br>                for (vector&lt;vtkSmartPointer&lt;vtkImageData&gt;&gt;::iterator PanoramaIterator = ImagePanorama.begin();PanoramaIterator &lt; ImagePanorama.end()-1;PanoramaIterator++)<br>
                {<br>                    VTKImageToITKImageType::Pointer VTKToITKConnector1 = VTKImageToITKImageType::New();<br>                    VTKToITKConnector1-&gt;SetInput(*PanoramaIterator);<br>                    VTKToITKConnector1-&gt;Update();<br>
<br>                    VTKImageToITKImageType::Pointer VTKToITKConnector2 = VTKImageToITKImageType::New();<br>                    VTKToITKConnector2-&gt;SetInput(*(PanoramaIterator+1));<br>                    VTKToITKConnector2-&gt;Update();<br>
                }<br>//////////////////////////////////////////<br><br>The iterators are returning the real time image as opposed to the stored image. I&#39;m not quite sure what the problem may be. Has anybody worked with smartpointers and vectors? Thank you all in advance.<br>
<br>Regards,<br>Alexis Cheng<br>Electrical Engineering<br>University of British Columbia<br>                                               </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 <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>
<br></blockquote></div><br>