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

Correction bug LargestPossibleRegion -> RequestedRegion

parent 81f191e9
Branches
Tags
No related merge requests found
...@@ -91,16 +91,16 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirecti ...@@ -91,16 +91,16 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirecti
throw e; throw e;
} }
} }
/** /**
* Set up state of filter before multi-threading. * Set up state of filter before multi-threading.
* InterpolatorType::SetInputImage is not thread-safe and hence * InterpolatorType::SetInputImage is not thread-safe and hence
* has to be set up before ThreadedGenerateData * has to be set up before ThreadedGenerateData
*/ */
template <class TInputImage, class TOutputImage, class TOutputImageDirection > template <class TInputImage, class TOutputImage, class TOutputImageDirection >
void void
TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection> TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
::BeforeThreadedGenerateData() ::BeforeThreadedGenerateData()
{ {
typename OutputImageDirectionType::RegionType region; typename OutputImageDirectionType::RegionType region;
...@@ -108,13 +108,12 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection> ...@@ -108,13 +108,12 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
OutputImageDirectionType * direction = this->GetOutputDirection(); OutputImageDirectionType * direction = this->GetOutputDirection();
region.SetSize(output->GetLargestPossibleRegion().GetSize()); region.SetSize(output->GetRequestedRegion().GetSize());
region.SetIndex(output->GetLargestPossibleRegion().GetIndex()); region.SetIndex(output->GetRequestedRegion().GetIndex());
direction->SetRegions( region ); direction->SetRegions( region );
direction->SetOrigin(output->GetOrigin()); direction->SetOrigin(output->GetOrigin());
direction->SetSpacing(output->GetSpacing()); direction->SetSpacing(output->GetSpacing());
direction->Allocate(); direction->Allocate();
} }
template <class TInputImage, class TOutputImage, class TOutputImageDirection > template <class TInputImage, class TOutputImage, class TOutputImageDirection >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment