[vtkusers] Problem reading a vtk-file with vtkStructuredGridReader

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Dec 17 05:52:09 EST 2008


On Wed, Dec 17, 2008 at 11:48 AM, Thomas Obenaus
<thomaso at eas.iis.fraunhofer.de> wrote:
> Mathieu Malaterre wrote:
>>
>> 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
>
> Hi Mathieu,
>
> I think the length of the filename is not the problem because the following
> example doesn't work too:
>
> VTK_ERROR - 2008-12-17 11:43:02 - NO_ERROR (0) reading file:  D:\wr\bf.vtk
> VTK_ERROR - 2008-12-17 11:43:02 - CANNOT_OPEN_FILE_ERROR (20002) reading
> file:  D:\wr\bf.vtk
>
> The correct path have to be D:\wör\bf.vtk and not D:\wr\bf.vtk.

http://en.wikipedia.org/wiki/8.3_filename


Get the path from a dos shell.


-- 
Mathieu



More information about the vtkusers mailing list