<div dir="ltr">Hi Matteo,<div><br></div><div>Is the reader->Update() call in a try-catch block [1]?</div><div><br></div><div>Thanks,</div><div>Matt</div><div><br></div><div>[1] <a href="http://itk.org/ITKExamples/src/Core/Common/TryCatchException/Documentation.html">http://itk.org/ITKExamples/src/Core/Common/TryCatchException/Documentation.html</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 6, 2014 at 12:06 PM, Matteo Pozza <span dir="ltr"><<a href="mailto:matteo.pozza@studenti.unipd.it" target="_blank">matteo.pozza@studenti.unipd.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<br>I'm trying to read a video with ITK: I want to get every
 single frame for compute some features. I'm trying to use the code 
below<br><br>typedef itk::RGBPixel<unsigned char> RGBPixelType;<br>typedef itk::Image< RGBPixelType, 2 > InputImageType;<br>
typedef itk::VideoStream<<div>InputImageType> VideoStream;<br>typedef itk::VideoFileReader<VideoStream> ReaderType;<br>ReaderType::Pointer reader = ReaderType::New();<br>reader->SetFileName( name );<br>
reader->Update();<br>
VideoStream::Pointer video = reader->GetOutput();<br>VideoStream::FramePointer singleFrame = video->GetFrame(0);<br><br>but
 reader->Update() gives me segmentation fault runtime error. I've 
already checked that the filename passed to the reader is consistent, so
 the error is really strange.<br>
I've looked for some examples but I've haven't found so much, so is 
likely that my code is somewhere wrong: I've also found that before 
instantiating the reader is appropriate to put<br><br>itk::ObjectFactoryBase::RegisterFactory( itk::FileListVideoIOFactory::New() );<br>
<br>but also with this line of code the error is the same at the same point.<br><br>I
 ask you to guide me to a correct use of these classes or to give me 
some advices about this problem: anyway, thank you for the attention!<span class="HOEnZb"><font color="#888888"><br>
<br>Matteo</font></span></div></div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>