LDicomDir::InsertDicomFile

#include "Ltdic.h"

L_UINT16 LDicomDir::InsertDicomFile(pszFileName)

L_TCHAR* pszFileName;

/* DICOM file name */

Adds a DICOM file to the Directory.

Parameter

Description

pszFileName

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

Returns

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.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomDir::InsertDicomDS, LDicomDir::OnInsertDicomFile, LDicomDir::LDicomDir, LDicomDir::ResetDicomDir, Class Members

Topics:

Creating DICOM Directories

 

Dicom Directories

Example

For an example, refer to LDicomDir::InsertDicomDS.