Click or drag to resize
SbImageDataAdapterHelperGetAppropriateAdapter Method (String, UInt64)

Loads data and returns a preconfigured SoImageDataAdapter instance based on the given filename extension.

Namespace: OIV.ImageViz
Assembly: OIV.ImageViz (in OIV.ImageViz.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
public static SoImageDataAdapter GetAppropriateAdapter(
	string filename,
	ulong maxMemory
)

Parameters

filename
Type: SystemString

File to load

maxMemory
Type: SystemUInt64

If the data is smaller than the specified maximum memory in MB (megabytes), getAppropriateAdapter() will load the data in memory and return an SoMemoryDataAdapter. Access to data will be faster using an SoMemoryDataAdapter than a file based adapter.

Return Value

Type: SoImageDataAdapter
Remarks

If no SoImageDataAdapter is available for this extension or an error occurs, then NULL is returned. Important:

  • 'filename' should be a valid filename or pattern.

  • A volume dataset can be loaded using a pattern like a simple regular expression. e.g.: "/dataset/motor3d/motor_*.jpg"). This implies all images in the generated list should be a part of the same volume.

  • The file extension is mandatory except for a DICOM directory. Therefore "/dataset/motor3d/*.jpg" is valid but "/dataset/motor3d/*" or "/dataset/motor3d/*.*" isn't.

  • Special case for DICOM: "/dataset/head3d/*" is valid, but only if it's a valid DICOM directory and the generated files contain only DICOM parts of the volume.

  • If 'maxMemory' is not set, the value of the environment variable IMAGEVIZ_MAX_MEMORY_ADAPTER is used, which is set to 500 MB by default.

    Supported file formats:

    The following file formats are supported without additional license:

    BMP (Windows only), DDS, GIF, JPEG 2000, JPEG, PGX, PNG, PNM, SGI RGBA, Sun, TIFF

    The table below shows file formats which are supported in combination with a VolumeViz license:

    File extension Reader class Description
    .am SoVRAmFileReaderAvizo Mesh file format
    .dc3, .dic, .dicom SoVRDicomFileReaderDICOM file format
    .fld SoVRAvsFileReaderAVS field file format
    .lda or .ldm SoVRLdmFileReaderLDM file format
    .sgy or .segy SoVRSegyFileReaderSEG Y rev 1 file format
    .vol SoVRVolFileReaderVol file format
    .vox SoVRVoxFileReaderVox file format
    .lst SoVRRasterStackReaderLst file format (stack of images)

    File format notes:

    • Avizo mesh Avizo mesh is a general purpose file format that can contain many different kinds of data. The VolumeViz file reader can load Avizo mesh files containing a 3-dimensional "Lattice" data object with uniform coordinates and any data type. See SoVRAmFileReader for limitations.

    • AVS field AVS field is a general purpose file format that can contain many different kinds of data. The VolumeViz file reader can load AVS field files containing 3-dimensional, uniform data of type "byte". See SoVRAvsFileReader.

    • DICOM A widely used format for storing medical image data (CT, MRI, etc), defined by the National Electrical Manufacturers Association (NEMA) (medical.nema.org). See SoVRDicomFileReader

    • LDM LDM is a format defined by VSG for storing hierarchical multi-resolution volume data. VolumeViz includes a utility program that can convert any other format supported by VolumeViz into this format (see SoVolumeConverter). Preprocessing volume data into this format provides the maximum benefits from the VolumeViz large data management (LDM) features. See SoVRLdmFileReader.

    • SEGY A widely used format for storing seismic trace data, defined by the Society of Exploration Geophysicists publication "Digital Tape Standards" (www.seg.org). The VolumeViz reader supports all sizes of integer and float data, and can correctly determine the number of samples per trace in many cases. However the reader also has many options to adapt to differences in SEGY file headers. See SoVRSegyFileReader.

    • VOL A simple volume interchange format (see "Introduction to Volume Rendering", Lichtenbelt, Crane, Naqvi, 1998). The VolumeViz reader can load files containing 8- or 16-bit voxels. See SoVRVolFileReader.

    • VOX A volume interchange format defined by TeraRecon Inc. (www.terarecon.com). The VolumeViz reader can load "Vox1999a" files containing 8- or 16-bit voxels (first volume only). See SOVRVoxFileReader.

    • LST (stack of images) A simple format for loading a stack of images (one image per file). Specify the names of the image files in a .lst file. VolumeViz can load image data in most common image formats including BMP, DDS, GIF, JPEG, JPEG2000, PNG and TIFF. See SoVRRasterStackReader for details and limitations.

    Note: '3D TIFF' files (multiple images in one file) are not currently supported.

See Also