Skip to content
Snippets Groups Projects
Commit 00a5b325 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Deactivating multithreading in INVERSE case until the bug is fixed

parent a97ebae3
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,7 @@ SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >
for ( unsigned int i = 0; i < InputImageDimension; i++ )
{
// TODO: This seems not right in odd index cases
destIndex[i] = srcIndex[i] / m_SubsampleFactor[i];
destSize[i] = srcSize[i] / m_SubsampleFactor[i];
}
......
......@@ -328,6 +328,7 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::FORWARD
for ( unsigned int i = 0; i < InputImageDimension; i++ )
{
// TODO: This seems not right in odd index cases
destIndex[i] = srcIndex[i] / GetSubsampleImageFactor();
destSize[i] = srcSize[i] / GetSubsampleImageFactor();
}
......@@ -358,6 +359,7 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::FORWARD
{
if ( i == direction )
{
// TODO: This seems not right in odd index cases
destIndex[i] = srcIndex[i] / GetSubsampleImageFactor();
destSize[i] = srcSize[i] / GetSubsampleImageFactor();
}
......@@ -633,7 +635,9 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE
m_UpSampleFilterFactor = 0;
m_SubsampleImageFactor = 1;
//this->SetNumberOfThreads(1);
// TODO: For now, we force the number threads to 1 because there is a bug with multithreading in INVERSE transform
// Resulting in discontinuities in the reconstructed images
this->SetNumberOfThreads(1);
}
template < class TInputImage, class TOutputImage, class TWaveletOperator >
......@@ -799,6 +803,7 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE
for ( unsigned int i = 0; i < InputImageDimension; i++ )
{
// TODO: This seems not right in odd index cases
destIndex[i] = srcIndex[i] / GetSubsampleImageFactor();
destSize[i] = srcSize[i] / GetSubsampleImageFactor();
}
......@@ -893,6 +898,7 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE
{
if ( i == direction )
{
// TODO: This seems not right in odd index cases
destIndex[i] = srcIndex[i] / GetSubsampleImageFactor();
destSize[i] = srcSize[i] / GetSubsampleImageFactor();
}
......@@ -1236,6 +1242,8 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE
itk::ImageRegionIterator< OutputImageType > out ( outputImage,
overSampledLowPass->GetOutput()->GetRequestedRegion() );
// TODO: This might be the cause of the multithreading bug : we use a neighborhood iterator on cropped data
// Are we sure that we have cropped enough data to access the neighborhood ?
NeighborhoodIteratorType lowIter ( lowPassOperator.GetRadius(),
overSampledLowPass->GetOutput(), overSampledLowPass->GetOutput()->GetRequestedRegion() );
itk::PeriodicBoundaryCondition< OutputImageType > boundaryCondition;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment