Commit 096904a2 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fixed a bug when doing multiple SetImage() with different images sizes

parent 75ddc967
......@@ -176,9 +176,15 @@ ImageWidgetBase<TPixel>
::SetInput(ImageType * image)
{
m_Image=image;
m_Image->UpdateOutputInformation();
SizeType size;
size.Fill(0);
m_BufferedRegion.SetSize(size);
SizeType displaySize;
displaySize[0]=this->w();
displaySize[1]=this->h();
m_ViewedRegion.SetSize(displaySize);
m_ViewedRegion.Crop(m_Image->GetLargestPossibleRegion());
}
/** Get the input image.
* \return The image to view.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment