]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx
no newline at end of file
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInfoTextImage.cxx
index e3a39578caffa39b8375f2ce39c39e0231da9a9c..d7db5b3248a9f3669aee87234d6040b8d656032d 100644 (file)
@@ -25,10 +25,12 @@ vtkInfoTextImage::~vtkInfoTextImage()
 
 void vtkInfoTextImage::Configure()
 {
-       _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 );
+       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 );
+       }
 }
 
 
@@ -283,9 +285,9 @@ void vtkInfoTextImage::PutPixelIntensity(int xx, int yy, int zz)
 
                if (imagedata->GetScalarType()==VTK_FLOAT)
                {
-                       long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
+                       float *pOrg=(float*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
        //              itoa (*pOrg,zTzxt,10);
-                       double tmp=*pOrg;
+                       double tmp=(double)*pOrg;
                        sprintf(zTzxt,"%3.2f",tmp);
                }