[Insight-users] Multi-threading a filter
    Jack Lee 
    jack.lee at kcl.ac.uk
       
    Wed Nov 28 07:16:34 EST 2012
    
    
  
Hi there,
I am trying to implement a multithreaded version of the 
itkHessian3DToVesselnessMeasureImageFilter.hxx. To do this, I've 
followed these steps (sorry it's a bit messy):
1) Created
ThreadedGenerateData(const OutputImageRegionType ®ion, ThreadIdType 
threadId)
2) changed the iterators' second parameter from
it = ImageRegionConstIterator< EigenValueOutputImageType >(
eigenImage, eigenImage->GetRequestedRegion() );
to
it = ImageRegionConstIterator< EigenValueOutputImageType >(
eigenImage, region );
and similarly with
oit = ImageRegionIterator< OutputImageType >( output, region );
3) commented out the line    this->AllocateOutputs();
This code segfaults, sometimes with error messages indicating that 
ImageConstIterator is trying to access indices outside the buffered 
region, and other times just with a silent core dump. If anybody can 
explain to me what is wrong with the changes made above (or, indeed 
steps I might have missed out) I'd appreciate it very much.
Best wishes,
Jack
    
    
More information about the Insight-users
mailing list