Click or drag to resize
SbImageDataAdapterHelperSaveToFile Method

Save given image to a file.

Namespace: OIV.ImageViz
Assembly: OIV.ImageViz (in OIV.ImageViz.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public static void SaveToFile(
	SoImageDataAdapter image,
	string filename
)

Parameters

image
Type: OIV.ImageViz.Nodes.ImagesSoImageDataAdapter
filename
Type: SystemString
Remarks

Filetype is determined by filename extension.

Supported formats are:

  • .ldm: Supports 2D or 3D image. Note: A VolumeVizLDM or LDMWriter license is required.

  • .tif: Supports only 2D images. To save a volume as a stack of tiff files, please use the .lst extension. If given image depth is > 1, an SbException is thrown.

  • .lst: If depth is >1, the volume is saved as a sequentially numbered set of TIFF files plus a “.lst” file. This collection of files can be reloaded as a volume by ImageViz or VolumeViz using OIV.VolumeViz.Readers.SoVRRasterStackReader.

Any other file extension will result in throwing an exception. A time series (getSize()[3] > 1) will result in throwing an exception.

This is just a convenience method. Other formats may be written using subclasses of OIV.Inventor.Image.SoRasterImageRW or by accessing the data (see OIV.ImageViz.SbImageDataAccessor) and writing explicitly.

See Also