Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoRasterImageFile Class Reference

VSG extension Class for raster image file input and output. More...

#include <Inventor/image/SoRasterImageFile.h>

+ Inheritance diagram for SoRasterImageFile:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoRasterImageFile ()
 Constructor.
 
SoNONUNICODE SoRasterImageFile (const char *fileName)
 Constructor that takes a file name.
 
 SoRasterImageFile (const SbString &fileName)
 Constructor that takes a file name.
 
 SoRasterImageFile (const FILE *fp)
 Constructor that takes a file pointer.
 
virtual ~SoRasterImageFile ()
 Destructor.
 
virtual SoNONUNICODE const char * getFileName () const
 Returns the file name that was given in the filename constructor.
 
virtual SbString getStringFileName () const
 Returns the file name that was given in the filename constructor.
 
virtual SoNONUNICODE const char * getFullPathFileName () const
 Returns the file name as a full path.
 
virtual SbString getStringFullPathFileName () const
 Returns the file name as a full path.
 
virtual SoNONUNICODE void setFileName (const char *fileName)
 Sets the file name.
 
virtual void setFileName (const SbString &fileName)
 Sets the file name.
 
virtual void setFilePointer (const FILE *fp)
 Sets the file pointer.
 
virtual FILE * getFilePointer () const
 Returns the file pointer.
 
virtual SbBool openRead (const SbStringList *directoryList)
 Opens the file (specified with setFileName) for reading.
 
virtual SbBool checkRead (const SbStringList *directoryList)
 Try to access the file for reading.
 
virtual SbBool openWrite (void)
 Open the file (specified with setFileName) for writing.
 
virtual void closeFile ()
 Close the file.
 
virtual void nullFilePtr ()
 Sets the filePointer to NULL for files closed internally such as RGB files.
 
virtual void setBinary (SbBool isBinary)
 Sets the file open binary mode.
 
virtual SbBool isBinary () const
 Returns the file open binary mode.
 
virtual SbString getFileSuffix () const
 Returns the file suffix.
 
Deprecated
virtual SoDEPRECATED SbBool openFile (SoRasterImageRW::OpenMode openMode)
 Opens the file with the specified open mode.
 
- Public Member Functions inherited from SoRasterImageIO
virtual ~SoRasterImageIO ()
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoRasterImageIO
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

VSG extension Class for raster image file input and output.

Class for raster image file input and output.

SEE ALSO

SoRasterImageIO, SoRasterImageRW, SbRasterImage

Definition at line 48 of file SoRasterImageFile.h.

Constructor & Destructor Documentation

◆ SoRasterImageFile() [1/4]

SoRasterImageFile::SoRasterImageFile ( )

Constructor.

◆ SoRasterImageFile() [2/4]

SoNONUNICODE SoRasterImageFile::SoRasterImageFile ( const char *  fileName)

Constructor that takes a file name.

Non Unicode: This function should not be used in a Unicode application.

◆ SoRasterImageFile() [3/4]

SoRasterImageFile::SoRasterImageFile ( const SbString fileName)

Constructor that takes a file name.

◆ SoRasterImageFile() [4/4]

SoRasterImageFile::SoRasterImageFile ( const FILE *  fp)

Constructor that takes a file pointer.

◆ ~SoRasterImageFile()

virtual SoRasterImageFile::~SoRasterImageFile ( )
virtual

Destructor.

Member Function Documentation

◆ checkRead()

virtual SbBool SoRasterImageFile::checkRead ( const SbStringList directoryList)
virtual

Try to access the file for reading.

(See "openRead") Returns TRUE if the file can be opened. The file remains closed.

Note: SbStringList is a list of pointers, not a list of objects, so the destructor for this class does not free the memory associated with the SbString objects. The application is responsible for deleting each object in the list.

◆ closeFile()

virtual void SoRasterImageFile::closeFile ( )
virtual

Close the file.

◆ getClassTypeId()

static SoType SoRasterImageFile::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getFileName()

virtual SoNONUNICODE const char * SoRasterImageFile::getFileName ( ) const
virtual

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.

Non Unicode: This function should not be used in a Unicode application.

◆ getFilePointer()

virtual FILE * SoRasterImageFile::getFilePointer ( ) const
virtual

Returns the file pointer.

◆ getFileSuffix()

virtual SbString SoRasterImageFile::getFileSuffix ( ) const
virtual

Returns the file suffix.

◆ getFullPathFileName()

virtual SoNONUNICODE const char * SoRasterImageFile::getFullPathFileName ( ) const
virtual

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.

Non Unicode: This function should not be used in a Unicode application.

◆ getStringFileName()

virtual SbString SoRasterImageFile::getStringFileName ( ) const
virtual

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.

◆ getStringFullPathFileName()

virtual SbString SoRasterImageFile::getStringFullPathFileName ( ) const
virtual

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.

◆ getTypeId()

virtual SoType SoRasterImageFile::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Implements SoRasterImageIO.

◆ isBinary()

virtual SbBool SoRasterImageFile::isBinary ( ) const
virtual

Returns the file open binary mode.

◆ nullFilePtr()

virtual void SoRasterImageFile::nullFilePtr ( )
virtual

Sets the filePointer to NULL for files closed internally such as RGB files.

◆ openFile()

virtual SoDEPRECATED SbBool SoRasterImageFile::openFile ( SoRasterImageRW::OpenMode  openMode)
virtual

Opens the file with the specified open mode.

◆ openRead()

virtual SbBool SoRasterImageFile::openRead ( const SbStringList directoryList)
virtual

Opens the file (specified with setFileName) for reading.

It first tries to open the specified filename. If that doesn't work, it tries opening the filename appended to each of the directory paths specified in directoryList . Returns TRUE if successful. Note: directoryList can be NULL.

Note: SbStringList is a list of pointers, not a list of objects, so the destructor for this class does not free the memory associated with the SbString objects. The application is responsible for deleting each object in the list.

◆ openWrite()

virtual SbBool SoRasterImageFile::openWrite ( void  )
virtual

Open the file (specified with setFileName) for writing.

The filename should be a full path. Returns TRUE if successful.

◆ setBinary()

virtual void SoRasterImageFile::setBinary ( SbBool  isBinary)
virtual

Sets the file open binary mode.

◆ setFileName() [1/2]

virtual SoNONUNICODE void SoRasterImageFile::setFileName ( const char *  fileName)
virtual

Sets the file name.

Non Unicode: This function should not be used in a Unicode application.

◆ setFileName() [2/2]

virtual void SoRasterImageFile::setFileName ( const SbString fileName)
virtual

Sets the file name.

◆ setFilePointer()

virtual void SoRasterImageFile::setFilePointer ( const FILE *  fp)
virtual

Sets the file pointer.


The documentation for this class was generated from the following file: