Install DCMTK (the DICOM Toolkit).

The recommended way to prepare DICOM files for 3D modeling and surface reconstructions in PS is to create for each patient a folder named DCMTK which contains an HFS AXIAL study series with slice spacing < 1 mm and consisting of 16-bit MONOCHROME DICOM files with little endian Transfer Syntax UID (tag 0002,0010 = 1.2.840.10008.1.2) that have been converted to .xml file format. XML (Extensible Markup Language) is a modern, cross platform, native file format of MacOS that supports both text and embedded binary data (e.g. using base64 encoding) and hence is used extensively by both MacOS and all PS file operations. XML is a markup language similar to HTML, but without predefined tags. Instead, a user defines their own tags designed specifically for their needs. This is a powerful way to store data in a format that can be stored, searched, and easily shared over networks.

The DICOM toolkit DCMTK is a collection of cross platform libraries and applications implementing large parts the DICOM standard for Unix operating systems including MacOS. To install DCMTK you must first install a package manager for MacOS such as Homebrew. Follow the instructions on the Homebrew web site. Once you have installed Homebrew, you can then install DCMTK from a MacOS terminal window using the command brew install dcmtk. Be sure to make note of the Unix file path at which DCMTK was installed, it may differ slightly depending upon your version of MacOS. The file path is typically something like usr/local/bin. If you have successfully installed DCMTK and PS can find it, the indicator button on the right of the Multiplanar Reconstruction (MPR) window status line will be green. If the button is red you will need to customize the file path to DCMTK in PS Folders Preferences. Click the red button to take you to the folder preferences window.

Create a DCMTK Folder for compressed pixel data

With the DCMTK toolkit installed and located:

  1. Launch PS6 and select the MPR window. Thw window can be empty as illustrated below. The dcmtk indicator icon on the right of the window status line should be green indicating that DCMTK is installed and reachable. PS version 6.8.6 and later supports the dragging & dropping of folders containing images onto this window which in turn will launch appropriate Unix shell scripts that interact with dcmtk functions. PS version 6.8.7 and later provide DICOM toolkit drop zones as a convenience. In the example below, a folder named CT was dragged onto the window. The contents of the folder were analyded and thje images were determined to use a form of JPEG compression (red text). The window status line includes the recommendation to release the drag on the dcmdjpeg drop zone which has also been highlighted with a blue background. The window and drop zones may also appear framed in a red or green highlight indicating whether the drop is recommended over the selected zone.
  2. EmptyWindowJPEG
  3. For each patient, create a working parent folder named DICOM (note: special folder names CT, MRI, DJPEG and DRLE are also allowed) somewhere other than at the 1st level of your patient folder and place within it an HFS AXIAL series of DICOM files (e.g. xxx.dcm) or sub-folders. Each sub-folder may contain either more sub-folders or a study series folder. Each study series folder should contain only the images that comprise a single study series. In this example illustrating a folder that contains sub-folders and JPEG compressed DICOM files, we have a patient folder Tutorial2022, Posterior and within it we have created a sub-folder named originals. Within the sub-folder originals we have created a working parent folder named DICOM, and within the DICOM folder a sub-folder named Ct Orbits - Sella Wo Contrast 70480. Within this folder is located another sub-folder named SOFT TISSUE THIN iDose(1) - 204 which contains a study series of DICOM (.dcm) files. Ideally all .dcm files should use the default little endian DICOM Transfer Syntax UID (tag 0002,0010 = 1.2.840.10008.1.2), but in this example the file Transfer Syntax UID indicated that the image pixel data was JPEG compressed.
  4. Step1
  5. Note: In this example the files in the study series SOFT TISSUE THIN iDose(1) - 204 happened to be JPEG compressed. PS does NOT support DICOM files that use compressed Transfer Syntax UIDs, but does provide a method to convert those JPEG or RLE compressed DICOM files to the expected default Transfer Syntax UID. If the images in a study series folder are JPEG compressed, launch PS and drag the working parent DICOM folder onto the MPR window while pressing the option key or onto the dcmdjpeg drop zone. (If the images in a study series folder are RLE compressed, launch PS and drag the working parent DICOM folder onto the MPR window while pressing the command key or onto the dcmdrle drop zone. The other drop zones support JPEG-LS decompression and converting noncompliant DICOM files.) PS will create a new folder (in the same location as each study series folder) named DJPEG or similar (for each study series) which contains uncompressed versions of all the DICOM files that were found in the folder. The supported functions are dcmdjpeg, dcmdjpls, dcmdrle and dcmconv which are included in the DCMTK toolkit.
  6. Step2
  7. Drag the DJPEG folder (or DRLE folder) onto the MPR window of PS6. PS6 will create a new folder (in the same location as the original folder) named DCMTK that contains .xml versions of all the now uncompressed DICOM files that were found in the DJPEG or DRLE folder. This is final conversion is accomplished using the dcm2xml function that is part of the DCMTK toolkit.
  8. Step3
  9. Drag the DCMTK folder to the 1st level within your patient folder along with any other ophthalmology imaging files such as b-scans US1, US2, and fundus images optomap, misc# and so on... With a DCMTK folder at the 1st level with a patient folder, there is no longer any need to manually export planar reconstructions such as Axial, Sagittal, Equator, t-Coronal and t-Meridan from OsiriX or Horus although you may still do so.
  10. Step4
  11. You can either manually drag a DCMTK folder onto the MPR window to load its images, or you may simply drag the patient folder itself onto the Image window as is usually done when intializing a new patient plan. Once a DCMTK folder has been parsed and its images loaded you will be presented with the MPR Calibration Sheet. You can review the metadata information of each image in this sheet.
  12. Step5
  13. Close the MPR Calibration Sheet and you can begin 3D eye modeling.
  14. Step6