Table: | For specifying the system |
MIL_CONST_TEXT_PTR FileName, | //in |
MIL_ID SystemId, | //in |
MIL_ID *ContainerOrBufIdPtr | //out |
This function restores the data that was previously saved to a file and loads it into an automatically allocated buffer or container. It tries to detect the file format from the data.
This function will allocate the destination buffer or container with the same attributes as the original buffer or container, with the exception of an M_IMAGE buffer.
In the case of an M_IMAGE buffer, the MbufRestore() function tries to allocate the buffer so that it can be used for acquisition (M_GRAB), display (M_DISP), and processing (M_PROC) operations. If there is insufficient appropriate memory to allocate such a buffer, it allocates one that can be used in all of the above operations except for acquisition (M_GRAB). Note that the maximum (total) number of grab (M_GRAB) buffers that can be allocated is restricted by the total amount of MIL non-paged (DMA) memory (specified at installation time or using the MILConfig utility). For systems with on-board processors, the total number of M_GRAB buffers and M_PROC buffers is limited by the amount of on-board memory.
If restoring an image, all the pixel information in the file is restored and loaded into the buffer. Additionally, if the file was saved in M_MIL_TIFF file format and includes any region of interest (ROI) information, the ROI information is also restored and loaded into the buffer.
If the vectorial information of an M_VECTOR_AND_RASTER ROI was input in M_WORLD units, the ROI will be restored as an M_VECTOR ROI.
When restoring compressed data, the buffer will have an M_COMPRESS attribute.
When restoring an image file that was saved with an associated LUT (color palette), the LUT is also restored and associated with the restored image buffer. You can obtain the identifier of the associated LUT, using MbufInquire().
After restoring a buffer or container, we recommend that you check that the operation was successful using MappGetError() or by checking that the buffer or container identifier returned is not M_NULL.
Note, you can perform the same operation as MbufRestore() using MbufImport(), which uses the specified file format to restore the data instead of trying to determine the format from the data.
Specifies the name and path of the file from which to restore the data buffer or container. The function handles (internally) the opening and closing of the file.
This parameter can be set to one of the following:
For specifying the file name and path
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_INTERACTIVE |
Opens the File Open dialog box from which you can interactively specify the drive, directory, and name of the file. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("FileName") 1 |
Specifies the drive, directory, and name of the file (for example "C:\mydirectory\myfile"). Typically, data buffer files can contain any of the file extensions listed in MbufImport. To specify the file on the remote computer (under Distributed MIL), prefix the specified file name string with "remote:///" (for example, "remote:///C:\mydirectory\myfile"). (summarize)Specifies the drive, directory, and name of the file (for example "C:\mydirectory\myfile"). (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ftp://user:password@server/pathtofile") 1 |
Restore data from a remote FTP server into an automatically allocated data buffer. To access a remote FTP server anonymously, omit the user name and password. FTPS is not supported. (summarize)Restore data from a remote FTP server into an automatically allocated data buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("http://user:password@server/pathtofile") 1 |
Restore data from a remote HTTP server into an automatically allocated data buffer. Import data from a remote HTTP server into a data buffer. HTTPS is not supported. (summarize)Restore data from a remote HTTP server into an automatically allocated data buffer. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the system on which to allocate the buffer or container.
This parameter should be set to one of the following values:
For specifying the system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT_HOST |
Specifies the default Host system of the current MIL application. |
||||||||||||||||||||||||||||||||||||||
MIL system identifier |
Specifies a valid system identifier, previously allocated using MsysAlloc(). |
Header | Include mil.h. |
Library | Use mil.lib;. |
DLL | Requires mil.dll, mil3d.dll for some formats. |