[Insight-developers] readers and regions
Damion Shelton
dmshelto@andrew.cmu.edu
Mon, 22 Apr 2002 11:37:16 -0400
Hi,
Wilson and I figured out (apparently) why the Difference of Gaussians
gradient filter was breaking, in the context of our multiprocessor machine.
The problem arises in the following lines:
<reader creation, initialization>
TImageType::Pointer inputImage = reader->GetOutput();
reader->Update();
inputImage->SetRequestedRegionToLargestPossibleRegion();
Later on the code, there is a mismatch between buffered, allocated, and
requested regions, which causes pixel access to behave quite strangely.
This problem goes away when we remove:
inputImage->SetRequestedRegionToLargestPossibleRegion();
Why does this work? What's bad about setting the requested region after an
image is loaded?
Thanks,
-Damion-