[vtkusers] Problem reading a vtk-file with vtkStructuredGridReader

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Dec 17 05:03:34 EST 2008


On Tue, Dec 16, 2008 at 10:04 AM, Thomas Obenaus
<thomaso at eas.iis.fraunhofer.de> wrote:
> Hi everybody,
>
> I'm trying to read vtk-files which contain data of the type
> vtkStructuredGrid. Using the vtkStructuredGridReader for this task is easy
> and returns the content of the vtk-file in most cases. But in case the
> filename or the path to the file contains a non-english character like
> (ö,ä,ü,...) the reader returns the following error-message
> "CANNOT_OPEN_FILE_ERROR (20002) reading file: D:\TEMP\Neuer
> Ordner\bfeld.vtk". Considering the example below I used to create the error,
> I think its a problem of missing unicode support because the "ö" in the
> filename böfeld.vtk is filtered out so that the reader can't find the file
> bfeld.vtk
>
> vtkStructuredGridReader reader = new vtkStructuredGridReader( );
> reader.SetFileName( "D:\\TEMP\\Neuer Ordner\\böfeld.vtk" );
> reader.Update( );
>
> My question is how can I workaround this problem?

Use the short name version of the filename (8 chars + max 3 chars file
extension).

2cts



More information about the vtkusers mailing list