Image data adapter for data in a file. More...
#include <ImageViz/Nodes/Images/SoFileDataAdapter.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoFileDataAdapter () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFFilePathString | fileName |
SoSFUInt32 | maxMemory |
Loads image data from a file. See SoImageDataAdapter for methods to access the data.
NOTE: SoFileDataAdapter provides access to the image data but does not guarantee that all the data is loaded in memory. Only SoMemoryDataAdapter is guaranteed to do that. As a result, only an SoMemoryDataAdapter (or an SoProxyDataAdapter that is attached to an SoMemoryDataAdapter) is completely safe to use as input for ImageViz filter engines. Many engines will work with data partially in memory, but some, for example SoImageRegistrationTransform3d, will only work if the image is completely in memory. See the documentation for the specific engines you are using. Conveniently, the utility method SoImageDataAdapterHelper::getAppropriateAdapter() returns an SoMemoryDataAdapter object if there is enough memory to load all the data.
fileName | "" |
maxMemory | 500 |
//Inherited | |
interpretation | VALUE |
extent | 0,0,0, 1,1,1 |
orientation | 0 0 0 1 |
SoImageDataAdapter, SoMemoryDataAdapter, SoProxyDataAdapter, SoVolumeReaderAdapter, SoImageDataAdapterHelper
SoFileDataAdapter::SoFileDataAdapter | ( | ) |
Default constructor.
static SoType SoFileDataAdapter::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoImageDataAdapter.
virtual SoType SoFileDataAdapter::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoImageDataAdapter.
Data filename to get data from.
See SbImageDataAdapterHelper::getAppropriateAdapter for a detailed description of supported file formats.
Specifies the maximum memory that may be allocated for the image in MB (megabytes).
If the data can fit in the specified maximum memory, the image will be loaded in memory as an SoMemoryDataAdapter.
Default value is 500 MB. The default value can be overridden by the environment variable IMAGEVIZ_MAX_MEMORY_ADAPTER.
Important note: This field must be set before the fileName field to be taken into account. See SbImageDataAdapterHelper::getAppropriateAdapter() for more details.