Leadtools.Dicom Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
InsertFile Method
See Also 
Leadtools.Dicom Namespace > DicomDir Class : InsertFile Method




fileName
The name of the DICOM file to be added to the DICOM Directory.
Adds a DICOM file to the Directory.

Syntax

Visual Basic (Declaration) 
Public Sub InsertFile( _
   ByVal fileName As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As DicomDir
Dim fileName As String
 
instance.InsertFile(fileName)
C# 
public void InsertFile( 
   string fileName
)
Managed Extensions for C++ 
public: void InsertFile( 
   string* fileName
) 
C++/CLI 
public:
void InsertFile( 
   String^ fileName
) 

Parameters

fileName
The name of the DICOM file to be added to the DICOM Directory.

Example

For an example, refer to Reset.

Remarks

Before using this method to add a DICOM file to the Directory, a destination folder must have been specified, either at the construction time or by using the Reset method . Otherwise, the method will fail.

The DICOM file to be added must reside in the destination folder or in a subfolder of the destination folder. Otherwise, the method 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 method must specify the absolute path of the file, not the relative one.

If fileName is set to a null reference (Nothing in Visual Basic), the method will add all the DICOM files contained in the destination folder to the DICOM Directory. In this case, the OnInsertFile callback method 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, use the Options property to set IncludeSubfolders to true, and then call this method with fileName set to a null reference.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Dicom requires a Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features