[Insight-users] Storing Filter Outputs in vectors

Matt McCormick matt at mmmccormick.com
Thu Feb 10 23:30:00 EST 2011



Alexis Cheng <acheng_1221 at ...> writes:

>for (int i = 0; i < 10; i++)                {
>...
>  FixedImageType::ConstPointer ITKImagePointer = VTKToITKConnector-
>GetOutput();
>.....
>}

Hi Alexis,

I don't see where you are instantiating VTKToITKConnector.  Note that you must
instantiate it within the loop because the output image for a filter is created
when the filter is created.  Otherwise, all the image pointers in your vector
are going to be pointing to the same single image.

Regards,
Matt




More information about the Insight-users mailing list