]> Creatis software - creaMaracasVisu.git/commitdiff
BUG text contour
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 30 Apr 2009 14:21:15 +0000 (14:21 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 30 Apr 2009 14:21:15 +0000 (14:21 +0000)
lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/manualContour.h

index 987cfa56b6cd4076efea38b5fa1b82922b1a44af..e8bd527a41d416506b394e1ea4cce9f39ef77906 100644 (file)
@@ -1524,7 +1524,6 @@ void manualViewContour::RefreshContour() // virtual
 // ----------------------------------------------------------------------------
 void manualViewContour::RefreshText()  // virtual
 {
-
        if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){
                int size = GetNumberOfPoints();
                char text[50];
@@ -2895,7 +2894,7 @@ void manualViewBaseContour::ConstructVTKObjects()
        //      Text
        _textActor = vtkTextActor::New();
 //     _textActor->SetDisplayPosition(200, 200);
-       _textActor->SetInput("");
+       _textActor->SetInput("00");
        // Set coordinates to match the old vtkScaledTextActor default value
 //     _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
 //     _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
@@ -3239,7 +3238,7 @@ void manualViewBaseContour::Refresh() // virtual
 void manualViewBaseContour::RefreshText()  // virtual
 {
        if( _textActor!=NULL)
-               _textActor -> SetInput(" ");
+               _textActor -> SetInput("00");
 }
 // ----------------------------------------------------------------------------
 void manualViewBaseContour::SetColorNormalContour(double r, double g, double b)
@@ -3481,9 +3480,8 @@ void manualViewBaseContour::SetVisible(bool ok)
        {
                opacity=1;
        } else {
-               opacity=0;
+               opacity=0.5;
        }
-
        vtkActor *actor;
        int i,size=_lstViewPoints.size();
        for (i=0;i<size;i++){
@@ -3492,7 +3490,7 @@ void manualViewBaseContour::SetVisible(bool ok)
        }
        _contourVtkActor->GetProperty()->SetOpacity( opacity );
        _textActor->GetProperty()->SetOpacity( opacity );
-       _textActor->SetInput(" ");
+       _textActor->SetInput("00");
 
 }
 // ----------------------------------------------------------------------------
@@ -3501,7 +3499,7 @@ void manualViewBaseContour::SetShowText(bool ok)
        _show_text = ok;
        if (_show_text==false)
        {
-               _textActor->SetInput(" ");
+               _textActor->SetInput("00");
        }
 }
 // ----------------------------------------------------------------------------
@@ -4195,7 +4193,7 @@ void manualContourControler::MouseMove(int x, int y) // virtual
        if (!IsEditable())
        {
                GetManualViewBaseContour()->RemoveControlPoints();
-               GetManualViewBaseContour()->RemoveTextActor();
+//             GetManualViewBaseContour()->RemoveTextActor();
                GetManualViewBaseContour()->Refresh();
                this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
        }
@@ -5192,10 +5190,8 @@ void manualContourBaseControler::MouseReleaseLeft(int x, int y)
        if (_state==7){ _state = 0; }
        SetMoving( false );
        GetManualViewBaseContour()->SelectPosibleContour(x,y,GetZ());
-printf("EED %p manualContourBaseControler::MouseReleaseLeft 01 \n",this);
        if( GetIfCompleteCreation() && IsEditable() && !GetManualViewBaseContour()->GetPosibleSelected() && (GetManualViewBaseContour()->GetIdPoint(x,y,GetZ())==-1)  )
        {
-printf("EED %p manualContourBaseControler::MouseReleaseLeft 02 \n",this);
                SetEditable( false );
                SetPosibleToMove( false );
        }
index af5237eef693c168ea20adfc319ba9be67822f60..2f3f7783060d50b83e39edfa8f1004ddeed20fc3 100644 (file)
@@ -569,7 +569,7 @@ private:
 // ----------------------------------------------------------------------------
 
 
-class creaMaracasVisu_EXPORT manualViewRoi: public manualViewBaseContour
+class creaMaracasVisu_EXPORT manualViewRoi: public manualViewContour
 {
 public:
        manualViewRoi();
@@ -595,7 +595,7 @@ private:
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
-class creaMaracasVisu_EXPORT manualViewBullEyeSector: public manualViewBaseContour
+class creaMaracasVisu_EXPORT manualViewBullEyeSector: public manualViewContour
 {
 public:
        manualViewBullEyeSector();