[Insight-users] Resample filter extremely slow after switching from 32 bit to 64 bit on Windows 7

John Drescher drescherjm at gmail.com
Wed Apr 18 15:57:35 EDT 2012


On Wed, Apr 18, 2012 at 3:47 PM, Erik Agterhuis
<erik.agterhuis at resolutionbc.com> wrote:
> Dear all,
>
>
>
> I had a nice resample filter running as part of a 32 bit application on
> windows7. It did the
>
> very simple job of ‘upsampling’ a 3D MRI dataset to a higher resolution
> using a nearest neighbour
>
> interpolator. Worked like a charm!
>
> Since I kept running into memory allocation bounds elsewhere in the
> application, I just recompiled everything to 64 bit, using VC++
>
> Express 2010. The application runs fine but the resample filter has become
> extremely slow
>
> (I’m talking 30 minutes versus 30 seconds!).
>
> Since I read earlier postings about avoiding debug mode, I made sure to
> stick to release mode. Just
>
> added debug information (program database mode). I have traced the problem
> down to the
>
> ‘ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType
>>:: LinearThreadedGenerateData(...’
>
> method in itkResampleImageFilter.hxx.
>
> The nested while loop over the output iterator (outIt)  in this method takes
> ages to finish.
>
> I’ve tried different multithreading settings (even disabling
> multithreading), as some posts elsewhere suggested the problem
>
> might have something to do with that.  As expected on my 4-core processor,
> having 4 threads is still
>
> the best setting, so this seems to have nothing to do with it.
>
> Any help would be much appreciated!
>

I am not sure what the express versions ( I have never used that)
offer but I have seen slowdowns like this in Visual Studio when going
from Release to Debug meaning I have seen filters take 100 times
longer in debug mode versus release.

John


More information about the Insight-users mailing list