| Customize Help
| Save Settings

MbufDiskInquire



Function Map
Synopsis
Inquire about the data in a file.
Syntax
MIL_INT MbufDiskInquire(
MIL_CONST_TEXT_PTR FileName, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires about the data in the specified file on disk.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
FileName

Specifies the file that contains the data.

function map For specifying the file name or memory stream
Click to summarizeValue Description
Click to summarize MIL_TEXT("FileName") 1

Specifies the drive, directory, and name of the file (for example, "C:\mydirectory\myfile"). Note, an error occurs if the file does not have a known file format or the file format is not supported.

The supported file types include all the formats supported by the MbufExport() and MbufExportSequence() functions. Since a raw data file does not have any information regarding size or type, you can only use MbufDiskInquire() to determine the file format of this type of file.

This function cannot access a file on the remote computer; the file must be located on the master computer.

(summarize)

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

InquireType

Specifies the type of file setting about which to inquire.

See the Parameter associations section for possible values that can be specified.

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • MIL_DOUBLE
  • MIL_INT
  • MIL_INT64

Specifies the address in which to write the requested information. Since the MbufDiskInquire() function also returns the requested information, you can set this parameter to M_NULL.

See the Parameter associations section for possible values that can be returned.

The tables below list possible values for the InquireType parameter and possible values returned to the UserVarPtr parameter.

The following inquire types allow you to inquire about general types of file settings.

function map For inquiring about general types of file settings
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_BYTE_ORDER

Inquires the file's byte order.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_BIG_ENDIAN

Specifies that the file is in big endian format.

Click to summarize M_LITTLE_ENDIAN

Specifies that the file is in little endian format.

Click to summarize M_FILE_FORMAT

Inquires the file format. SET SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_AVI_CODEC

Specifies an AVI format used with a codec found on your computer, where the AVI is not an M_AVI_DIB, M_AVI_MIL or M_AVI_MJPG.

Click to summarize M_AVI_DIB

Specifies an AVI format used to hold non-compressed DIB images . INFO

Click to summarize M_AVI_MIL

Specifies an AVI format used to hold images in their MIL format. INFO

Click to summarize M_AVI_MJPG

Specifies an AVI format used to hold JPEG compressed sequences. INFO

Click to summarize M_BMP

Specifies that the data is saved in a BMP file format. INFO

Click to summarize M_GENDC

Specifies that the data is saved in the GenDC file format. INFO

Click to summarize M_JPEG2000_LOSSLESS

Specifies that the data is saved in a JPEG2000 lossless file format. INFO

Click to summarize M_JPEG2000_LOSSLESS_JP2

Specifies that the data is saved in a JPEG2000 lossless file format using the standard JP2 format. INFO

Click to summarize M_JPEG2000_LOSSY

Specifies that the data is saved in a JPEG2000 lossy file format. INFO

Click to summarize M_JPEG2000_LOSSY_JP2

Specifies that the data is saved in a JP2000 lossy file format using the standard JP2 file format. INFO

Click to summarize M_JPEG_LOSSLESS

Specifies that the data is saved in a JPEG lossless file format. INFO

Click to summarize M_JPEG_LOSSLESS_INTERLACED

Specifies that the data is saved in an interlaced JPEG lossless file format. INFO

Click to summarize M_JPEG_LOSSY

Specifies that the data is saved in a JPEG lossy file format. INFO

Click to summarize M_JPEG_LOSSY_INTERLACED

Specifies that the data is saved in an interlaced JPEG lossy file format. INFO

Click to summarize M_JPEG_LOSSY_RGB

Specifies that the data is saved in a JPEG lossy file format. INFO

Click to summarize M_MIL_NATIVE

Specifies that the data is saved in the MIL native file format. INFO

Click to summarize M_MIL_TIFF

Specifies that the data is saved in a MIL file format that uses the baseline TIFF 6.0 file format with extra MIL information included in the comment field. INFO

Click to summarize M_PLY_ASCII

Specifies that the data is saved in the PLY file format using ASCII encoding.

Click to summarize M_PLY_BINARY_LITTLE_ENDIAN

Specifies that the data is saved in the PLY file format using binary encoding.

Click to summarize M_PNG

Specifies that the data is saved in a PNG file format.

Click to summarize M_RAW

Specifies that the data is saved as raw data. INFO

Click to summarize M_STL_ASCII

Specifies that the data is saved in the STL file format using ASCII encoding. INFO

Click to summarize M_STL_BINARY

Specifies that the data is saved in the STL file format using binary encoding. INFO

Click to summarize M_TIFF

Specifies that the data is saved in a TIFF file format. INFO

Click to summarize M_USE_EXTENSION

Specifies that the data is saved in a format automatically determined from the file extension specified in the FileName parameter. INFO

Click to summarize M_OBJECT_TYPE

Inquires the type of MIL object stored in the file.

Note that AVI files return M_IMAGE as an object type.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT64
Click to summarize M_ARRAY

Specifies that the file stores an array buffer.

Click to summarize M_CONTAINER

Specifies that the file stores a container.

Click to summarize M_IMAGE

Specifies that the file stores an image buffer.

Click to summarize M_KERNEL

Specifies that the file stores a kernel buffer.

Click to summarize M_LUT

Specifies that the file stores a LUT buffer.

Click to summarize M_STRUCT_ELEMENT

Specifies that the file stores a struct element buffer.

Click to summarize M_TYPE

Inquires the file data type and depth. The depth is returned in bits.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize depth value + M_FLOAT

Specifies the data depth and that the data type is floating-point.

Click to summarize depth value + M_SIGNED

Specifies the data depth and that the data type is signed.

Click to summarize depth value + M_UNSIGNED

Specifies the data depth and that the data type is unsigned.

You can inquire the following values for M_KERNEL and M_STRUCT_ELEMENT files.

function map For M_ARRAY, M_IMAGE, M_KERNEL, M_LUT and M_STRUCT_ELEMENT
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_RESOLUTION_X

Inquires the X-resolution of the file in pixels per inch (PPI).

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize 0.0

Specifies that the file has no resolution information.

Click to summarize Value > 0.0

Specifies the X resolution in PPI.

Click to summarize M_RESOLUTION_Y

Inquires the Y-resolution of the file in pixels per inch (PPI). If the file has no resolution information, 0 is returned.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize 0.0

Specifies that the file has no resolution information.

Click to summarize Value > 0.0

Specifies the Y resolution in PPI.

Click to summarize M_SIGN

Inquires whether the file's data is signed or unsigned.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_SIGNED

Specifies that the data is signed.

Click to summarize M_UNSIGNED

Specifies that the data is unsigned.

Click to summarize M_SIZE_BAND +

Inquires the number of color bands in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize 1 <= Value <= 3

Specifies the number of color bands.

Click to summarize M_SIZE_BIT

Inquires the file data depth.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize 1 <= Value <= 64

Specifies the data depth, in bits.

Click to summarize M_SIZE_X +

Inquires the width of the data in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

Specifies the width of the data, in pixels.

Click to summarize M_SIZE_Y

Inquires the height of the data in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

Specifies the height of the data, in pixels.

Combination value for M_SIZE_BAND; M_SIZE_X.

You can add the following value to the above-mentioned values to get the width or the number of bands of the LUT associated with the image.

This option is available only if image data was saved to the file. This option is not available for AVI files.

function map For obtaining information about the LUT associated with the image
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_LUT

Inquires either the width or the number of bands of the LUT associated with the image in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_INVALID

Specifies that there is no LUT associated with the image.

Click to summarize Value

Specifies either the width of the LUT associated with the image in the file (for M_SIZE_X) or the number of bands of the LUT associated with the image in the file (for M_SIZE_BAND).

You can inquire the following values for M_IMAGE files (images or AVI sequences).

function map For M_IMAGE
Click to summarize
InquireType
Description
UserVarPtr
- Possible values returned
Click to summarize M_ASPECT_RATIO

Inquires the aspect ratio of the images in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0.0

Specifies the aspect ratio.

Click to summarize M_CALIBRATION_PRESENT

Inquires whether the calibration information associated with the buffer was saved, using MbufExport() with M_WITH_CALIBRATION.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_FALSE

Specifies that the calibration was not saved.

Click to summarize M_TRUE

Specifies that the calibration was saved.

Click to summarize M_COMPRESSION_TYPE
[For essential MIL-Lite information, see remarks ]

Inquires the compression type of the images in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_NULL

Specifies that the images are not compressed.

Click to summarize M_COMPRESSION_CCITTFAX3

Specifies that the file holds TIFF CCITT FAX3 data . INFO

Click to summarize M_COMPRESSION_CCITTFAX4

Specifies that the file holds TIFF CCITT FAX4 data . INFO

Click to summarize M_COMPRESSION_CCITTRLE

Specifies that the file holds TIFF CCITT RLE data . INFO

Click to summarize M_COMPRESSION_CCITTRLEW

Specifies that the file holds TIFF CCITT RLEW data . INFO

Click to summarize M_COMPRESSION_LZW

Specifies that the file holds TIFF LZW data .

Click to summarize M_COMPRESSION_PACKBITS

Specifies that the file holds TIFF PackBits data .

Click to summarize M_JPEG2000_LOSSLESS

Specifies that the file holds JPEG2000 lossless data. INFO

Click to summarize M_JPEG2000_LOSSY

Specifies that the file holds JPEG2000 lossy data. INFO

Click to summarize M_JPEG_LOSSLESS

Specifies that the file holds JPEG lossless data. INFO

Click to summarize M_JPEG_LOSSLESS_INTERLACED

Specifies that the file holds JPEG lossless data in separate fields. INFO

Click to summarize M_JPEG_LOSSY

Specifies that the file holds JPEG lossy data. INFO

Click to summarize M_JPEG_LOSSY_INTERLACED

Specifies that the file holds JPEG lossy data in separate fields. INFO

Click to summarize M_FRAME_RATE

Inquires the frame rate of an AVI file.

This value is only valid for sequences.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value > 0.0

Specifies the frame rate, in number of images/second.

Click to summarize M_LUT_PRESENT

Inquires the presence of LUT data in the file.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_NO

Specifies that LUT data is not available.

Click to summarize M_YES

Specifies that LUT data is available.

Click to summarize M_NUMBER_OF_IMAGES

Inquires the number of images in an AVI file.

This value is only valid for sequences. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value > 0

Specifies the number of images.

You can inquire the following values for M_KERNEL and M_STRUCT_ELEMENT files.

function map For M_KERNEL and M_STRUCT_ELEMENT
Click to summarize
InquireType
Description
UserVarPtr
- Possible values returned
Click to summarize M_OFFSET_CENTER_X

Inquires the X-coordinate of the center of the kernel or structuring element.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

Specifies the X-coordinate.

Click to summarize M_OFFSET_CENTER_Y

Inquires the Y-coordinate of the center of the kernel or structuring element.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value

Specifies the Y-coordinate.

Click to summarize M_OVERSCAN

Inquires the overscan type.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies that MIL automatically selects the type of overscan to optimize speed and logic according to the specified operation and the target system.

Click to summarize M_DISABLE

Specifies that no overscan is used, unless processing the border pixels is faster than ignoring them; in the latter case, MIL automatically selects the overscan to optimize speed according to the specified operation and the target system.

Click to summarize M_FAST

Specifies that MIL automatically selects the overscan to optimize speed according to the specified neighborhood operation and the target system. INFO

Click to summarize M_MIRROR

Specifies a type of overscan that processes the border pixels of a source image using overscan pixel values that mirror the source buffer pixel values. INFO

Click to summarize M_REPLACE

Specifies a type of overscan that processes the border pixels of a source image using overscan pixel values set to the overscan replacement value (M_OVERSCAN_REPLACE_VALUE).

Click to summarize M_REPLICATE

Specifies a type of overscan that processes the border pixels of a source image using overscan pixel values that replicate the border pixels. INFO

Click to summarize M_TRANSPARENT

Specifies a type of overscan that processes the border pixels of a source image using transparent overscan pixel values. INFO

Click to summarize M_OVERSCAN_REPLACE_VALUE

Inquires the replacement value for the overscan pixel values.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_REPLACE_MAX

Specifies that the overscan neighborhood pixel values will be set to the maximum value of the source buffer.

Click to summarize M_REPLACE_MIN

Specifies that the overscan neighborhood pixel values will be set to the minimum value of the source buffer.

Click to summarize Value

Specifies the value of the overscan neighborhood pixels.

You can inquire the following values for M_KERNEL files.

function map For M_KERNEL
Click to summarize
InquireType
Description
UserVarPtr
- Possible values returned
Click to summarize M_ABSOLUTE_VALUE

Inquires the absolute value setting.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DISABLE

Specifies not to take the absolute value of the result.

Click to summarize M_ENABLE

Specifies to take the absolute value of the result. INFO

Click to summarize M_NORMALIZATION_FACTOR

Inquires the normalization factor.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value > 0

Specifies the normalization factor. INFO

Click to summarize M_SATURATION

Inquires the saturation flag.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DISABLE

Specifies not to saturate results, except when MIL can take advantage of optimization routines to accelerate the processing. INFO

Click to summarize M_ENABLE

Specifies to saturate results. INFO

Return value
The returned value is the requested information, cast to a MIL_INT. If the requested information does not fit into a MIL_INT, this function will return M_NULL or truncate the information. If the requested information is not available, M_INVALID is returned. If an AVI file is specified but its codec is not known, M_AVI_CODEC_UNSUPPORTED is returned.
Remarks
  • [MIL-Lite]
    Note that MIL-Lite does not support the inquiries available for M_KERNEL and M_STRUCT_ELEMENT data buffers.
  • [MIL-Lite]
    Note that during development and at runtime, compression support requires the presence of a MIL license that grants access to the compression/decompression package. This access is only granted by default with the development license dongle for the full version of MIL. In other cases, you must purchase access to this package separately.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
BYTE ORDER BIG ENDIAN LITTLE ENDIAN FILE FORMAT AVI CODEC AVI DIB AVI MIL AVI MJPG BMP GENDC JPEG2000 LOSSLESS JPEG2000 LOSSLESS JP2 JPEG2000 LOSSY JPEG2000 LOSSY JP2 JPEG LOSSLESS JPEG LOSSLESS INTERLACED JPEG LOSSY JPEG LOSSY INTERLACED JPEG LOSSY RGB MIL NATIVE MIL TIFF PLY ASCII PLY BINARY LITTLE ENDIAN PNG RAW STL ASCII STL BINARY TIFF USE EXTENSION OBJECT TYPE ARRAY CONTAINER IMAGE KERNEL LUT STRUCT ELEMENT TYPE FLOAT SIGNED UNSIGNED RESOLUTION X RESOLUTION Y SIGN SIGNED UNSIGNED SIZE BAND SIZE BIT SIZE X SIZE Y LUT INVALID ASPECT RATIO CALIBRATION PRESENT FALSE TRUE COMPRESSION TYPE NULL COMPRESSION CCITTFAX3 COMPRESSION CCITTFAX4 COMPRESSION CCITTRLE COMPRESSION CCITTRLEW COMPRESSION LZW COMPRESSION PACKBITS JPEG2000 LOSSLESS JPEG2000 LOSSLESS JPEG2000 LOSSY JPEG2000 LOSSY JPEG LOSSLESS JPEG LOSSLESS JPEG LOSSLESS INTERLACED JPEG LOSSLESS INTERLACED JPEG LOSSY JPEG LOSSY JPEG LOSSY INTERLACED JPEG LOSSY INTERLACED FRAME RATE LUT PRESENT NO YES NUMBER OF IMAGES OFFSET CENTER X OFFSET CENTER Y OVERSCAN DEFAULT DISABLE FAST MIRROR REPLACE REPLICATE TRANSPARENT OVERSCAN REPLACE VALUE REPLACE MAX REPLACE MIN ABSOLUTE VALUE DISABLE ENABLE NORMALIZATION FACTOR SATURATION DISABLE ENABLE IMAGE KERNEL STRUCT ELEMENT