[vtkusers] Insert Label using Unicode
jimmigoo
jimmigoo at gmail.com
Thu Jun 21 04:57:17 EDT 2012
Hi everybody!
I compiled my code in UNICODE Character Set, while VTK libraries are
compiled in MULTI BYTE Character Set ( because I tried to compile VTK
generating VTK.sln with proper CMake settings on UNICODE support ).
I have to visualize VTK annotations and label text on 3d scenario, but I
cannot view correct unicode string.
I tried to substitute vtkStringArray with vtkUnicodeStringArray, with no
positive results.
In this code portion, I get a wxString ( a 2.9.3 wxWidgets string, similar
to std::wstring ), and I try to convert it into a vtkUnicodeString, to
insert it in a vtkUnicodeStringArray ( stringData ).
for (size_t i = 0, l = GetNumberOfLandmark(); i < l; i++)
{
wxString numString = p_point[i]->GetLabel();
stringData->InsertNextValue(vtkUnicodeString::from_utf16((const
vtkTypeUInt16*)numString.wc_str()));
}
I tried also to insert this code portion from a VTK.git example, with no
positive result.
stringData->InsertNextValue(vtkUnicodeString::from_utf8("\xce\xb1\xce\xb2\xce\xb3"));
I really appreciate any comments or suggestion about how to solve this
problem.
I'm looking for any reply,
Regards,
jimmigoo
--
View this message in context: http://vtk.1045678.n5.nabble.com/Insert-Label-using-Unicode-tp5714054.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list