//======================================================================================== // // // These routines built in Igor by Patrick Groenestein // // January, 2000. // P.G. - 24 Mar 2000. Matched DICOM 3.0 standard. Fixed endian handling. // P.G. - 26 Mar 2000. Added scaling to displayed images. // P.G. - 29 Mar 2000. Added auto loading of the DICOM dictionary. // P.G. - 17 Feb 2001. Added support for GE machines that produce non-standard files. // P.G. - 21 Feb 2001. Complete rebuild for speed, new interface. // P.G. - 12 Mar 2001. Added optional byte swapping functions (XOP) // P.G. - Dec 2006-Jan 2007. Extensive rewrite. Added support for multilayer files and icon containing files // P.G. - 05 Apr 2010 Added nested 'SQ' for icon sequences // P.G. - 11 Apr 2010 Added support to force implicit VR for files with transfer syntax // P.G. - 18 Apr 2010 Rebuilt the dictionary to have dimension labels (quicker search than looking for group & element) // This change also returns the pixel data element in the header output // // This code is in the public domain. // This code was laid out in a monospace font. // Current version 5.03 // // Some of these routines were inspired by Pascal sources from: // // Dicom.p // by: Jim Nash, Synergistic Research Systems (jim.nash@his.com) // Reads and decodes the DICOM header so that NIH Image can // import DICOM images. DICOM (Digital Imaging and Communications // in Medicine) is a format popular in the medical imaging // community. This code is in the public domain. // // //======================================================================================== The DICOM loading routines consist of: This README file PG_DICOMLoader5.ipf PG_DICOMLoader Help.ihf DICOM dictionary.txt The zipped file contains an experiment containing an adopted procedure of the DICOM loading routines. If you want to use these more widely, you can select the procedure file from Windows -> Procedure Windows -> PG5_DICOMLoader5 and "Save as" into your usual folder/directory of Igor procedures (use DisplayHelpTopic "Procedure Windows[Shared Procedure Files]" for more information in the Igor help system). You can then access the functions by using #include "PG5_DICOMLoader" in you main or other procedure files. When Igor is compiled The 'Load Waves' menu item of the 'Data' menu will contain a submenu called 'Load DICOM File...'. Select the Help item to read about the routines. The first time it is used, the program will ask for the location of the DICOM dictionary (if not found in expected place), which it will copy to its own location (you can delete the original if you want - the copy will be in the 'PG_DICOM_Data' path, which you can override to point to a single location for multiple experiment files, otherwise it creates the path at the level of the 'home' path, in a subfolder called 'PG_LoadDICOM_Data). The routines will store preferences here as well. DICOM is a 'free form' protocol popular in medical circles for exchanging information. It is concerned with the exchange of information between various vendors and users. Since the DICOM 3.0 standard there is a formal layout for the file format, which older (NEMA) files did not have to follow (and were much more variable in their readability as a consequence). There is no format as such: the standard only specifies how data elements are to be organised. A lot of the most useful header elements are documented in the DICOM dictionary, but there are many vendor specific elements which are not so documented, and there is nothing to stop anyone defining their own header elements and contents. There is no guaranteed content in a DICOM file, either: the data does not necessarily contain any images. These vagaries accepted, most DICOM files do contain images, from such sources as computed radiography, CT, MRI, PET, or nuclear scans, and these routines can deal with them.