[vtkusers] vtkTiffReader canreadfile

William A. Hoffman billlist at nycap.rr.com
Thu Feb 5 08:38:34 EST 2004


  // Description:
  // Return non zero if the reader can read the given file name.
  // Should be implemented by all sub-classes of vtkImageReader2.
  // For non zero return values the following values are to be used
  //   1 - I think I can read the file but I cannot prove it
  //   2 - I definitely can read the file
  //   3 - I can read the file and I have validated that I am the 
  //       correct reader for this file
  virtual int CanReadFile(const char* vtkNotUsed(fname))

At 07:06 AM 2/5/2004, Sébastien MARAUX wrote:
>Is there a mistake between return 0 and return res in vtkTiffReader -> CanReadFile ?
>Canreadfiles used to return 1 when it was successful, now it returns 3 if OK, and 0 if error.
> 
> 
>int vtkTIFFReader::CanReadFile(const char* fname)
>{
>  vtkTIFFReaderInternal tf;
>  int res = tf.Open(fname);
>  tf.Clean();
>  if (res)
>    {
>    return 3;
>    }
>  return 0;
>}
> 
>and tf.open() returns 1 when it is successful.
> 
>Any Help will be appreciated.
>
>S. MARAUX
> 
>-----Message d'origine-----
>De : vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] De la part de Sébastien MARAUX
>Envoyé : jeudi 5 février 2004 11:08
>À : vtkusers at vtk.org
>Objet : [vtkusers] vtkTiffReader canreadfile
> 
>Hello
> 
>I was using vtkTiffReader in an old piece of code. (1 and half / 2 years old)
>I recently needed it, so I downloaded latest vtk 4.2.5.
> 
>When I call canReadFile on file that I was able to read before, it returns 3.
>What does it means ?
> 
>I used to check that return code was 1, and see in current tiffreader code
>that there is only 2 return values : 0 and 3.
> 
>What has changed ?
> 
>Thanks in advance for any help.
> 




More information about the vtkusers mailing list