Download Sources
This source code implements Location Registration and Recognition (LRR) algorithm. The algorithm includes feature extraction,
estimation, and decision components. The code is distributed under the Apache 2.0 license approved by the Open Source Initiative (OSI).
Note 12/12/2013: Updated code to work with ITK version 4.
Build
CMake build system is recommended for creating make files and project files. CMake files are included with the source code distribution.
Run
The algorithm components are run separately without including them in one executable.
This makes the components easier to debug, evaluate, and integrate in other projects. The disadvantage is that data is loaded and saved multiple times.
What follows are the steps to run the LRR algorithm. The steps consists of calling each executable from simple bash scripts (use directly in Linux or
download Cygwin to use on Windows). In the scripts, you will need to modify path to your binaries.
You can also run the executables directly (see below).
Step 1. Extract features, keypoints, and descriptors:
./extract_features.bash volumes_with_nodules.txt
|
The script also calls a script that computes a Voronoi map for each feature set:
./compute_distance_map.bash volumes_with_nodules.txt
|
In addition, the script also computes watershed oversegmentations by running:
./watershed_segmentation.bash volumes_with_nodules.txt
|
Features, keypoints, and descriptors are stored in a VTK format.
Alternatively, you can run the command line executables directly for each volume (CMD> denotes command line):
CMD> cd 0009/4893
CMD> ExtractFeatures 4978whole 4978whole_00.vtk
CMD> ExtractKeypoints 4978whole_00.vtk 4978wholekeypoints.vtk
CMD> ComputeDescriptors 4978wholekeypoints.vtk 4978whole_00.vtk 4978wholedesc.vtk
CMD> compute_distance_map 4978whole
CMD> WatershedSegmentation1 4978whole 4978wholewatershed 2.0 10 0.001 0.10
|
Repeat the steps for volume in 0009/4717.
Step 2. Generate initializations by keypoint indexing:
./invariant_indexing.bash pairs_with_nodules.txt
|
This creates a directory ``nodules'' which contains: 1) moving and fixed
descriptors for each match, 2) images surrounding fixed and moving keypoints,
3) the query location and its neighborhood within fixed image.
Running the executable directly:
CMD> cd 0009
CMD> indexing_one_descriptor.exe 4717/4722wholedesc.vtk 4893/4978wholedesc.vtk -mov 4717/4722whole -fix 4893/4978whole -trans 4893_4978whole-4717_4722wholediff.vtk -locs 4893/4978nodules.txt
|
(Note: Images are specified for debugging purposes. They are not used in the algorithm.)
Step 3. Use the initializations generated in the previous step to refine the estimate and output the verified transform:
./location_registration.bash pairs_with_nodules.txt
|
This creates a directory ``nodulesreg'' that contains: 1) a text file with
the final estimated transform and various statistics, and 2) a transform
and its inverse in VTK format. If LAST_ITER is defined as 1 in the code,
the executable will also produce a panel of 9 images containing fixed, moving,
and checkerboard images of axial, sagittal, and coronal slices.
Running the executable directly:
CMD> cd 0009
CMD> location_registration.exe 4893/4978whole 4717/4722whole -trans 4893_4978whole-4717_4722wholediff.vtk -matches 4893/4978nodules.txt -segment watershed
|
(Note: Images are specified for debugging purposes. They are not used in the algorithm.)
Publications and Further Reading
Back to Location Registration and Recognition page.
For questions and comments contact Michal Sofka at:
|