]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx
#3317 creaMaracasVisu Feature New Normal - plane information inf viewerNV
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInfoTextImage.cxx
index 7d76ca9aa5761f2cf9dcca7faaea4254fc1bdb0b..33d6f4c269780f9d8cf7dff67d64dad7b043d9bb 100644 (file)
@@ -37,6 +37,7 @@ vtkInfoTextImage::vtkInfoTextImage()
        _vtkText_ColorLevel             = NULL;
        _vtkText_position               = NULL;
        _vtkText_pixelIntensity = NULL;
+       _vtkText_plane                  = NULL;
        _marimagedata                   = NULL;
 }
 
@@ -51,10 +52,11 @@ vtkInfoTextImage::~vtkInfoTextImage()
 void vtkInfoTextImage::Configure()
 {
        if(_vtkText_WindowLevel == NULL){
-               _vtkText_WindowLevel    = Create_Text_Label( 10 , 55 );
-               _vtkText_ColorLevel             = Create_Text_Label( 10 , 40 );
-               _vtkText_position               = Create_Text_Label( 10 , 25 );
-               _vtkText_pixelIntensity = Create_Text_Label( 10 , 10 );
+               _vtkText_WindowLevel    = Create_Text_Label( 10 , 60 );
+               _vtkText_ColorLevel             = Create_Text_Label( 10 , 45 );
+               _vtkText_position               = Create_Text_Label( 10 , 30 );
+               _vtkText_pixelIntensity = Create_Text_Label( 10 , 15 );
+               _vtkText_plane                  = Create_Text_Label( 10 , 0 );
        }
 }
 
@@ -63,14 +65,14 @@ void vtkInfoTextImage::Configure()
 
 void vtkInfoTextImage::SetMarImageData(marImageData *marimagedata)
 {
-       _marimagedata=marimagedata;
+       _marimagedata = marimagedata;
 }
 
 //-------------------------------------------------------------------
 
 void vtkInfoTextImage::SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview)
 {
-       _wxvtk2Dbaseview=wxvtk2Dbaseview;
+       _wxvtk2Dbaseview = wxvtk2Dbaseview;
 }
 
 //-------------------------------------------------------------------
@@ -118,6 +120,7 @@ void vtkInfoTextImage::PutWindowLevel()
 void vtkInfoTextImage::PutColorLevel()
 {
        double value = _wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->GetLevel();
+
        char zTzxt[20];
        char resultText[50];
 
@@ -130,6 +133,24 @@ void vtkInfoTextImage::PutColorLevel()
        _vtkText_ColorLevel             -> SetInput(resultText);
 }
 
+//-------------------------------------------------------------------
+void vtkInfoTextImage::PutPlane()
+{
+       int plane = _wxvtk2Dbaseview->GetDirection();
+       char zTzxt[20];
+       char resultText[50];
+
+       if (plane==0) { strcpy(resultText,"plane:YZ"); }
+       if (plane==1) { strcpy(resultText,"plane:XZ"); }
+       if (plane==2) { strcpy(resultText,"plane:XY"); }
+
+//     itoa (value,zTzxt,10);
+//     sprintf(zTzxt,"%d",value);
+
+//     strcat(resultText,zTzxt);
+       _vtkText_plane          -> SetInput(resultText);
+}
+
 //-------------------------------------------------------------------
 
 void vtkInfoTextImage::PutPosition(int xx,int yy, int zz)
@@ -187,9 +208,6 @@ void vtkInfoTextImage::PutPosition(int xx,int yy, int zz)
        strcat(resultText,zTzxt);
        strcat(resultText,")");
 
-
-
-
        _vtkText_position               -> SetInput(resultText);
 }