Software at CIS : RLM


Content

Overview

rlm (Rigid Landmark Matching) is a program to rigidly rotate and translate a template image to match a target image based on landmark information. If no image files are supplied, the program will just match the landmark files.

Typical Usage and Parameters:

rlm atlas.lmk target.lmk _nzI _nyI _nxI BW_REFERENCE [atlas.img defAtlas.img target.img defPatient.img]

The following are the command line options.

  1. Atlas_Landmark_File: Input file in the format described below
  2. Target_Landmark_File: Input file in the format described below
  3. _nzI: Image Dimensions in Z
  4. _nyI: Image Dimensions in Y
  5. _nxI: Image Dimensions in X
  6. BW_REFERENCE (0 or 1): Tells the program if the landmarks are in the reference of BrainWorks (BW_REFERENCE=1; origin is not (0,0,0) but (nzI, nyI, nxI) or in the reference of the cube in C++ (BW_REFERENCE=0) where origin is (0,0,0). Typically, this parameter should also be set to 1 for landmarks placed in Mojo.
  7. Atlas_Image: Input file in Analyze format
  8. Deformed_Atlas_Image: File name for output Analyze file
  9. Target_Image: Input file in Analyze format
  10. Deformed_Target_Image: File name for output Analyze file
Landmark File Format:

The format for an input landmark file is as follows:
  N
  Label_1
  Landmark 1
  .
  .
  Label_i
  Landmark i
  .
  .
  Label_N
  Landmark N  
Where
  • N is the number of landmarks in the file
  • Label_i is a label for the ith landmark with no whitespaces. Note that the label is not important for the matching; the order of the landmarks is what counts.
  • Landmark i is the ith landmark. Consists of 5 whitespace-delimited double-precision floating point numbers x, y, z, a, b. Typically a = b = 1.

Output:
The program will output the following files:

  • Atlas_Landmark_File.def: Rigidly deformed atlas landmark file
  • Target_Landmark_File.def: Rigidly deformed target landmark file
  • Translation.txt: the 1 x 3 matrix describing the translation from template to deformed template
  • Rotation.txt: the 3 x 3 matrix describing the rotation from template to deformed template
  • Deformed_Atlas_Image (if supplied): The rigidly deformed atlas image
  • Deformed_Target_Image (if supplied): The rigidly deformed target image

3-D Prism Example:

Prism Example (64x64x64) in tar format

Output in tar format

rlm prism1.lmk prism2.lmk 64 64 64 1 prism1.img defPrism1.img prism2.img defPrism2.img
Atlas Target
  Deformed Atlas
 

2-D Triangle Example:

Triangle Example (80x80) in tar format

Output in tar format

rlm triangle1.lmk triangle2.lmk 1 80 80 0 triangle1.img defTriangle1.img triangle2.img defTriangle2.img
Atlas Target
  Deformed Atlas
 

Software developed with support from National Institutes of Health NCRR grant P41 RR15241.

Last Modified: Monday, 25th April, 2011 @ 11:20am