Class SoRasterImageFile


public class SoRasterImageFile extends SoRasterImageIO
Class for raster image file input and output. Class for raster image file input and output.

See Also:
  • Constructor Details

    • SoRasterImageFile

      public SoRasterImageFile()
      Constructor.
    • SoRasterImageFile

      public SoRasterImageFile(String fileName)
      Constructor that takes a file name.
  • Method Details

    • openFile

      @Deprecated(since="9.0.0.0") public boolean openFile(SoRasterImageRW.OpenModes openMode)
      Deprecated.
      As of Open Inventor 9.0.0.0. Use openRead() or openWrite() instead.
      Opens the file with the specified open mode.

      Warning Deprecated since Open Inventor 9000. Use openRead() or openWrite() instead.

    • openWrite

      public boolean openWrite()
      Open the file (specified with setFileName) for writing. The filename should be a full path. Returns true if successful.
    • isBinary

      public boolean isBinary()
      Returns the file open binary mode.
    • getFileName

      public String getFileName()
      Returns the file name that was given in the filename constructor. If the filename constructor was not used, this method returns an empty string. To get the file name as a full path, the methods getFullPathFileName() or getStringFullPathFileName() should be used.
    • nullFilePtr

      public void nullFilePtr()
      Sets the filePointer to NULL for files closed internally such as RGB files.
    • getStringFullPathFileName

      public String getStringFullPathFileName()
      Returns the file name as a full path. If the filename constructor was not used, this method returns an empty string. This method should be called after openRead() or openWrite(), or else it will return an empty string. To get the file name as it was passed to the constructor, the methods getFileName() or getStringFileName() should be used.
    • closeFile

      public void closeFile()
      Close the file.
    • setFileName

      public void setFileName(String fileName)
      Sets the file name.
    • setBinary

      public void setBinary(boolean isBinary)
      Sets the file open binary mode.
    • getStringFileName

      public String getStringFileName()
      Returns the file name that was given in the filename constructor. If the filename constructor was not used, this method returns an empty string. To get the file name as a full path, the methods getFullPathFileName() or getStringFullPathFileName() should be used.
    • getFileSuffix

      public String getFileSuffix()
      Returns the file suffix.
    • getFullPathFileName

      public String getFullPathFileName()
      Returns the file name as a full path. If the filename constructor was not used, this method returns an empty string.

      This method should be called after openRead() or openWrite(), or else it will return an empty string. To get the file name as it was passed to the constructor, the methods getFileName() or getStringFileName() should be used.