X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkInfoTextImage.cxx;h=d7db5b3248a9f3669aee87234d6040b8d656032d;hb=37319ea6defbf2dc5ddce23e0b65c2247543ae33;hp=e3a39578caffa39b8375f2ce39c39e0231da9a9c;hpb=a4ee3758aa0477f677fb981e2c4d6e29995e8db8;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx index e3a3957..d7db5b3 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx @@ -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); }