LDicomDir::InsertDicomFile

#include "Ltdic.h"

L_UINT16 LDicomDir::InsertDicomFile(pszFileName)

Adds a DICOM file to the Directory.

Parameters

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 at the construction time or by the function LDicomDir::ResetDicomDir. 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 LDicomDir::OnInsertDicomFile 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 LDicomDir::SetOptions and then call this function with pszFileName set to NULL.

If the parameter pszFileName is not NULL, LDicomDir::OnInsertDicomFile will not be called.

Required DLLs and Libraries

Platforms

Win32, x64

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

LEADTOOLS DICOM C++ Class Library Help