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

Correction bug ICD.

parent 48f91ea2
No related branches found
No related tags found
No related merge requests found
...@@ -57,13 +57,15 @@ void ...@@ -57,13 +57,15 @@ void
FixedSizeFullImageWidget<TPixel> FixedSizeFullImageWidget<TPixel>
::Init(int x, int y, int w, int h, const char * l) ::Init(int x, int y, int w, int h, const char * l)
{ {
m_ImageLoaded=false;
m_ImageOverlayLoaded=false;
if(!this->GetInput()) if(!this->GetInput())
{ {
itkExceptionMacro("No input image!"); itkExceptionMacro("No input image!");
} }
else else
{ {
this->GetInput()->Update(); // this->GetInput()->Update();
this->SetViewedRegion(this->GetInput()->GetLargestPossibleRegion()); this->SetViewedRegion(this->GetInput()->GetLargestPossibleRegion());
this->label(l); this->label(l);
this->resize(x, y, w, h); this->resize(x, y, w, h);
...@@ -139,6 +141,12 @@ bool ...@@ -139,6 +141,12 @@ bool
FixedSizeFullImageWidget<TPixel> FixedSizeFullImageWidget<TPixel>
::UpdateOpenGlImageOverlayBufferedRegionRequested(void) ::UpdateOpenGlImageOverlayBufferedRegionRequested(void)
{ {
if(this->GetImageOverlayBufferedRegion().GetSize()[0]==0
||this->GetImageOverlayBufferedRegion().GetSize()[1]==0)
{
m_ImageOverlayLoaded=false;
}
if(m_ImageOverlayLoaded) if(m_ImageOverlayLoaded)
{ {
......
...@@ -314,7 +314,7 @@ ImageWidgetBase<TPixel> ...@@ -314,7 +314,7 @@ ImageWidgetBase<TPixel>
{ {
UpdateOpenGlImageOverlayBufferedRegion(); UpdateOpenGlImageOverlayBufferedRegion();
m_ImageOverlay->SetRequestedRegion(m_BufferedRegion); m_ImageOverlay->SetRequestedRegion(m_BufferedRegion);
m_ImageOverlay->Update(); m_ImageOverlay->UpdateOutputData();
RebuildOpenGlImageOverlayBuffer(); RebuildOpenGlImageOverlayBuffer();
} }
......
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