<br>Hello marquis2,<br><br>please take a look at<br>
<a href="http://public.kitware.com/pipermail/insight-users/2003-December/005975.html">http://public.kitware.com/pipermail/insight-users/2003-December/005975.html</a><br>Hopefully it describes what you need.<br>
<br>
Cheers,<br>
<br>
Frederic Perez<br>
<br>On 4/21/05, <a href="mailto:marquis2@etu.unige.ch">marquis2@etu.unige.ch</a> <<a href="mailto:marquis2@etu.unige.ch">marquis2@etu.unige.ch</a>> wrote:<br>> hi,<br>> <br>> is it ok to reuse a filter many times or does it have to be instanciated once
<br>> per use ? the docs suggests the first but I have a SIGABRT with a<br>> BinnaryThresholdImageFilter< ImageType, ImageType ><br>> (with ImageType = short, 2) for every _second_ image I want to filter:<br>
> <br>> Program received signal SIGABRT, Aborted.<br>> [Switching to Thread 16384 (LWP 12578)]<br>> 0x4096cb71 in kill () from /lib/i686/libc.so.6<br>> (gdb) bt<br>> #0 0x4096cb71 in kill () from /lib/i686/libc.so.6
<br>> #1 0x4080bcf1 in pthread_kill () from /lib/i686/libpthread.so.0<br>> #2 0x4080c00b in raise () from /lib/i686/libpthread.so.0<br>> #3 0x4096c904 in raise () from /lib/i686/libc.so.6<br>> #4 0x4096de8c in abort () from /lib/i686/libc.so.6
<br>> #5 0x40910305 in __cxxabiv1::__terminate(void (*)()) () from<br>> /usr/lib/libstdc++.so.5<br>> #6 0x40910342 in std::terminate() () from /usr/lib/libstdc++.so.5<br>> #7 0x409104c2 in __cxa_throw () from /usr/lib/libstdc++.so.5
<br>> #8 0x081c9fe2 in itk::DataObject::PropagateRequestedRegion() ()<br>> #9 0x081d964a in itk::ProcessObject::PropagateRequestedRegion(itk::DataObject*)<br>> ()<br>> #10 0x081c9e7f in itk::DataObject::PropagateRequestedRegion() ()
<br>> #11 0x081c9cb5 in itk::DataObject::Update() ()<br>> <br>> code is:<br>> <br>> thresholdFilter->SetInput(image);<br>> thresholdFilter->SetLowerThreshold( threshold );<br>> thresholdFilter->SetUpperThreshold( itk::NumericTraits< PixelType >::max());
<br>> thresholdFilter->SetOutsideValue( 0 ) ;<br>> thresholdFilter->SetInsideValue( white );<br>> thresholdFilter->Update();<br>> <br>> is there other "cleaning"<br>> I should make between each use so that it does not crash on the second?
<br>> <br>> My code works fine with ::New() before each use.<br>> <br>> TIA for any help!<br>> Samuel<br>> <br>> _______________________________________________<br>> Insight-users mailing list<br>>
<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>> <br>