}
}
- if (imagedata->GetScalarType()==VTK_CHAR)
+ else if (imagedata->GetScalarType()==VTK_CHAR)
{
char *pOrg=(char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_SIGNED_CHAR)
+ else if (imagedata->GetScalarType()==VTK_SIGNED_CHAR)
{
signed char *pOrg=(signed char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_UNSIGNED_CHAR)
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_CHAR)
{
unsigned char *pOrg=(unsigned char*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_SHORT)
+ else if (imagedata->GetScalarType()==VTK_SHORT)
{
short *pOrg=(short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_UNSIGNED_SHORT)
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_SHORT)
{
unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_INT)
+ else if (imagedata->GetScalarType()==VTK_INT)
{
int *pOrg=(int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",*pOrg);
}
- if (imagedata->GetScalarType()==VTK_UNSIGNED_INT)
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_INT)
{
unsigned int *pOrg=(unsigned int*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%d",tmp);
}
- if (imagedata->GetScalarType()==VTK_LONG)
+ else if (imagedata->GetScalarType()==VTK_LONG)
{
long *pOrg=(long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%3.2f",tmp);
}
- if (imagedata->GetScalarType()==VTK_UNSIGNED_LONG)
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_LONG)
{
unsigned long *pOrg=(unsigned long*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%3.2f",tmp);
}
- if (imagedata->GetScalarType()==VTK_FLOAT)
+ else if (imagedata->GetScalarType()==VTK_FLOAT)
{
float *pOrg=(float*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
sprintf(zTzxt,"%3.2f",tmp);
}
- if (imagedata->GetScalarType()==VTK_DOUBLE)
+ else if (imagedata->GetScalarType()==VTK_DOUBLE)
{
double *pOrg=(double*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz);
// itoa (*pOrg,zTzxt,10);
camera->SetParallelScale( spx*(x2-x1)/3.0 );
// text information over the graphic window
- _vtkIinfoTextImage = new vtkInfoTextImage();
- _vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor();
+ if(_vtkIinfoTextImage == NULL){
+ _vtkIinfoTextImage = new vtkInfoTextImage();
+ _vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor();
+ ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
+ }
_vtkIinfoTextImage->SetWxVtk2DBaseView(this);
_vtkIinfoTextImage->SetMarImageData( GetVtkBaseData()->GetMarImageData() );
- _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);
+ _vtkIinfoTextImageInteractor->SetModelVtkInfoTextImage(_vtkIinfoTextImage);
_vtkIinfoTextImage->Configure();
- ((vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView())->AddInteractorStyleMaracas(_vtkIinfoTextImageInteractor);
+
} // okimage
} // imageData