QMed_OpenImage

QMed_OpenImage(imageRef; imagePath):error
imageRef Longint Reference to the image
imagePath Text Full path name to the image file
error Longint Error result

Opens the image stored in the specified file and returns an image reference. This reference is used in QMedical commands to refer to the specific image and its associated data.

The reference to the image is returned in the imageRef parameter. QMedical calls QuickTime to identify the image. If the specified file format is not supported by QuickTime, imageRef is set to 0 and the qmed_paramErr error code is returned. To get a list of all supported formats, call the QMed_GetImportTypes command.

If imagePath is empty, QMedical presents a file selection dialog where the user can preview and select an image file. If the user selects a file, the full pathname is returned in imagePath, otherwise error qmed_userCancelErr is returned.

Note: After you have finished working with an image reference, you should destroy it by calling QMed_CloseImage.

Example

  `Open an image file
 
C_LONGINT($error)
C_TEXT($imagePath)
C_LONGINT(gImageRef)
 
$imagePath:="Hard disk:images:CR-MONO1-10-chest.dcm"
 
$error:=QMed_OpenImage (gImageRef;$imagePath)
 
If ($error=qmed_noErr)
   `Image opened successfully
End if

Related commands

QMed_CloseImage Destroys an image reference

QMedical © Escape
Generated by QDoc 2.8 on Wed, Jan 27, 2010 17:54:27