]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInfoTextImageInteractor.cxx
index cf03c7c8234723cf75b5e258e73ffef32e93eb8b..45c33dfda17deef7d4a9f499a8d0a93c14959031 100644 (file)
@@ -45,8 +45,15 @@ bool vtkInfoTextImageInteractor::OnMouseMove()
        
        GetVtkInfoTextImage()->PutWindowLevel();
        GetVtkInfoTextImage()->PutColorLevel();
-       GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
-       GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
+
+       int tempext[6];
+       ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData()->GetExtent(tempext);
+
+       if(tempext[0] <= xx && xx <= tempext[1] && tempext[2] <= yy && yy <= tempext[3]){
+
+               GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
+               GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
+       }
 
        this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
        return true;