L_DicomDirInsertFile

#include "ltdic.h"

L_LTDIC_API L_UINT16 L_DicomDirInsertFile(hDicomDir, pszFileName)

Adds a DICOM file to the Directory.

Parameters

HDICOMDIR hDicomDir

A DICOMDIR handle

L_TCHAR *pszFileName

Character string that contains the name of the DICOM file to be added to the Dicom Directory.

Returns

Value Meaning
0 The function was successful.
> 0 An error occurred. Refer to Return Codes.

Comments

Before using this function to add a DICOM file to the Directory, a destination folder must have been specified, either when it was constructed or by the function L_DicomDirReset. Otherwise, the function will fail.

The DICOM file to be added must reside in the destination folder or in a subfolder of the destination folder. Otherwise, the function will fail and the file will not be added to the Directory. For example, if the destination folder is specified as "C:\DICOM Images\", then the DICOM file "C:\DICOM Images\Patient 1\Brain" can be added to the Directory, while the DICOM file "C:\Images\Knee" cannot be added. Please notice that the filename passed to the function must specify the absolute path of the file, not the relative one.

If the parameter pszFileName is set to NULL, the function will add all the DICOM files contained in the destination folder to the Dicom Directory. In this case, the callback function DICOMDIRCALLBACK will be called for each file, so that the progress can be monitored. To add all the DICOM files in the destination folder and all the Dicom files in the subfolders of the destination folder, set the bIncludeSubfolders member of a DICOMDIROPTIONS structure to TRUE, set this new option by calling L_DicomDirSetOptions and then call this function with pszFileName set to NULL.

If the parameter pszFileName is not NULL, INSERTDICOMFILECALLBACK will not be called.

Required DLLs and Libraries

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.