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 );
+ }
}
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);
}