Region of Interest (ROI) Coordinates

The coordinates of the individual pixels at the location of, or within ROIs can be written to a disk file.

Writing Coordinates

Pixel coordinates at or within ROIs can be written to a disk file in a tabular format suitable for importing into a spread-sheet for further analysis. The format of a file is given in the file formats section, and is a space (" ") separated tabular format, with the coordinate of each position contributing one row to the table. The values written are the coordinates in 3-D; thus 3 columns are written.

The coordinates written are dependent on the type of ROI:

The coordinate system used for output is set from within the Preferences, and can be:

  • L,P,S. First coordinate increases to the subject's left; second coordinate increases to the subject's posterior; third coordinate increases to the subject's superior. This is the coordinate system used by DICOM.
  • R,A,S. First coordinate increases to the subject's right; second coordinate increases to the subject's anterior; third coordinate increases to the subject's superior. This is the coordinate system used by SPM, FSL etc.
  • x,y,z. First coordinate increases with image column number (to the right as viewed on screen); second coordinate increases with image row number (to the bottom as viewed on screen); third coordinate increases with increasing slice number.
  • The coordinate units are mm.

    The first line of the output file consists of a header such as
    # L P S
    to indicate the coordinate system. The different ROIs are separated by either:

    Following this, each pixel coordinate for that ROI is then written on a separate line.

    Write the ROI coordinates using Write Coordinates from the File menu of the ROI Toolkit: file_write_roi_coordinates,

    A File Chooser will prompt you for a file name into which to write the coordinates (default extension ".txt"; default file name from the image name). If the file already exists, you will be asked whether you want to:

    The ROI Toolkit will now write the pixel coordinates for all the ROIs of the image, to the file.

    Jim Home