Leadtools.Dicom Namespace > DicomDir Class : InsertFile Method |
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 DicomDirOptions.IncludeSubfolders to true, and then call this method with fileName set to a null reference.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2