Importing and Converting Images

Importing and Converting means changing a bunch of importable image files (such as DICOM files) into one of the multi-slice image formats (Analyze, NIFTI-1, NIFTI-2, UNC or multi-slice DICOM). The importing/converting process involves organising the images so that the resulting images each represent one "scan". What's the difference between importing and converting?

  • Importing means loading a multi-slice image in an external format (such as DICOM) directly into Jim's viewer. Therefore, only one multi-slice image can be imported at a time. This is good for browsing through images or analysing just one image at a time.
  • Converting means changing a whole batch of multi-slice images in an external format (such as DICOM) into a loadable format and storing them on disk. This is good for handling images in bulk: they can be conveniently loaded after conversion with minimal delay, and without having re-import them for further analysis.

Jim can import/convert images in the following medical image file formats:

  • DICOM 3. Most DICOM 3 files can be imported. You may experience difficulty if the images have been compressed in a non-standard or unusual way. Please send mail to Contact Xinapse Systems support if you have difficulty.
  • ACR-NEMA I and II.
  • Bruker ParaVisionTM format images. A Bruker image data set is stored in multiple files. Jim uses three of them to create an importable image:
    • 2dseq contains the pixel data.
    • reco contains details of how the image was reconstructed.
    • method (higher up in the directory hierarchy) contains details of image acquisition.

To correctly import Bruker images, Jim must have access to all 3 files. You must therefore have the complete ParaVisionTM directory tree structure on your disk.

The Converter allows you to build a DICOM-like Patient/Study/Series/Acquisition/Image Tree structure, from images contained in a directory or set of directories. You can then select a particular group of related images and load them as a 3-dimensional image data set.

Launching the Image Converter

Select Converter from the File menu: Launching the Image Converter

Selecting the Images to be Converted

First, select the images files (such as DICOM files) to be converted. Click the Select files button button to choose the image files. You select either a directory containing some files, or individual files within a directory (press the SHIFT or CONTROL keys on your keyboard to select multiple directories or files). To convert Bruker ParaVisionTM images, select the directory (or directories) that contain the entire image data set(s).

You can add more files to the list by clicking the Button to add files to convert button. Then, press the Scan for images button button.

Alternatively, if you are reading your DICOM images from an offline image source, such as a CD-ROM, there may be a DICOMDIR file on the disk. A DICOMDIR file lists all the scans that are present on the CD-ROM, and scanning the DICOMDIR file is much quicker than reading all the image headers. Click the Scan dicomdir for images button button to use this method of scanning for images. A File Chooser will pop up, allowing you to select the DICOMDIR file on the CD-ROM. The image scan will then begin.

After scanning through the files you have chosen, the Converter will build a "tree" structure of patients and scans. Double click on one of the patients listed to show the individual image series (scans) for that patient, as shown below for patient "V.C".

The Medical Image Converter tool showing a tree of images

Double clicking on any part of the list either expands of collapses that part of the list.

Importing or Converting

To import images (load into the Jim's viewer), select "Load result". To batch convert images, select "Save to disk".

Selecting whether to load and image or save it to disk

  • To import an image, ensure you have a node of the image tree containing only one 3- or 4-dimensional image dataset (such as one image series), as shown below. Then click the Button to import the selected image button.

One image series selected

If the Button to import the selected image is not active, then you have not selected a tree node that contains only one 3-D dataset. Double click on that tree node to expand it, and select one of the sub-nodes of the tree. After a few moments, the multi-slice image that you selected will be loaded into the Image Display frame, and the image selection box, near the top of the Image Display frame will show a summary of the loaded image.

Summary of the imported image details

If you later save the image in one of the loadable formats, the suggested image name will be composed from a combination of the patient name, patient ID, study number, series number and acquisition number for the scan. Note that the imported data is not saved to disk in a loadable format unless you explicitly do so.

You can drag and drop an image series from the Image Converter onto any image selection box. So, you can drop the image series onto the image selection box in Jim's display, or into one of the image selection boxes in any of Jim's tools.

Dragging and dropping into one of Jim's tools

Dragging and dropping with the mouse from the Image Converter into the Algebra Tool's input image selection box.

You can also drag and drop an image series from the Image Converter onto any multiple image selection panel. For example, you can drop the image series onto multiple image selection panel on the Image Concatenator.

Dragging and dropping a multiple image selection panel

Dragging and dropping with the mouse from the Image Converter into the Image Concatenator's multiple input image selection panel.

  • To convert images, select any node of the image tree. All images within that node will be converted. For example, if you select a patient node, all scans for that patient will be converted to a 3-D format and stored on disk. You can select more than one node by pressing the SHIFT or CONTROL keys as you click on the tree nodes, as shown below.

Choose the format of the images that will be created, by clicking on the appropriate button:

Buttons to select which type of image to save

Then click the Button to convert the selected images button to start the conversion. The images will be stored in Jim's current working directory. To change the image storage directory select Image Storage Directory from the Configure menu (see below).

If you do not want to import or convert all slices of a particular scan, then double click on the series node for that scan to expand it and show the nodes for the individual image slices. If a series has multiple acquisitions, then double click on the acquisition node also. Use the SHIFT and CONTROL keys on your keyboard as you click on the slices you want (to select more than one slice). In the example below, the CONTROL key was pressed as the mouse was clicked on the individual slices, to select just slices 1, 3, 5 and 6 of Series 4.

Convert individual slices

Press the SHIFT key as you click to select a complete range of slices.

Anonymising the Converted Images

If you want to anonymise the patient details, select the Check box to anonymise the images as they are converted check-box before you start the conversion or import. The patient name and other patient details (such as the patient's maiden name, address and 'phone number) will be stripped from the images as they are created. If the input images are DICOM images, all private DICOM elements will be removed on conversion. In addition, the file name of the image created will not contain the patient's name.

Note: You can anonymise DICOM files without converting them using the DICOM anonymiser tool.

Configuring Image Converter

The following options are available under the Configure menu:

Menu to configure the Image Converter tool

  • Image Storage Directory ...
    Use this to change the location where converted images will be stored. When you click this, a File Chooser pops up allowing you to select the new directory for image storage.

  • Logging ...
    Normally image import and conversion occurs "silently" - messages and errors are not displayed to the user. To turn on logging of warning and error messages, select this menu item, and then choose a file name for logging. All messages will be written to the chosen log file until logging is turned off.

  • Preferences ...
    This pops up the preferences dialog for Image Converter:

Converter preferences

This allows you to choose:

  • How scans are handled when an MRI scan has multiple echo times, or when the same scan is acquired multiple times to create a time-series of images. As an example, this type of scanning is done for DCE-MRI or fMRI.

    The different echo times or time points can be:

    • All put into a single 3-D image.
    • All put into a single 4-D image, where the 4th dimension represents the different echo times or time-points.
    • Split across multiple 3-D image files, with one file per echo time or time-point.
  • What Converter should do when a converted image already exists on disk in the chosen image storage folder.

    • If you select "Do not overwrite the existing image", an error message will be shown and the existing image will not be overwritten.
    • If you select "Overwrite the existing image", the existing image will be overwritten without any warning messages.
    • If you select "Create a new image with a copy file name", a new image will be created with a modified file name, appended with a suffix "_aa" .. "_zz".
  • What to do when converting to DICOM. Sometimes, other image processing applications cannot handle DICOM images with multiple image slices in one DICOM file (or enhanced DICOM images). If this is the case, you may want to output DICOM images with one file per image slice. If so, select this option.

  • The widths of the labels in the Image Converter when displaying the Patient Name, Patient ID and Study Description.

  • Whether to save text files containing the b-values, gradient vectors and b-matrices when converting diffusion-weighted images and saving them to disk. The coordinate system for gradients vectors and and b-matrices is the image row/column/slice directions. These text files may be useful when running external diffusion processing packages.

Click the Save settings button button to save the settings so that they will be retained next time you start Jim.

Click the Button to finish with the Image Converter tool button in the Image Converter when you have finished with importing or converting images.