Internal:Execution And Evaluation Medical Images

From crtc.cs.odu.edu
Jump to navigation Jump to search

Author: Eleni Adam (Originally in /RC/group/RC_NIKOS/Eleni/Manuals/ExecutionAndEvaualtion.txt)

Procedure of Running and Evaluating Image Registration Codes:

EXECUTION:

Codes

BSpline: BSpline code through Slicer

The BSpline code can be found on the General Registration (BRAINS) tool in Slicer.

  • Proposed parameters:
       Slicer BSpline transform: set file name
       Output Image Volume: set file name
       Initialization transform: Off
       Choose BSpline registration phase
       MMI, Linear interpolation, 5% sampling, 100 histogram bins, LBFGSB optimizer type, 
       1500 iterations, 15x15x15 grid size, 10^-3 min step length, 10^-5 projected gradient tolerance
     
  • To get the displacement field:
       Use Convert section in Transform module of Slicer to convert the acquired transform to a displacement field.
       (BSpline to deformation field module of Slicer only works for the old-style ITK bspline transform that is not used anymore, so don't use it)

NEM: FPBNRR code (a.k.a. Trunk/ Biofemir/ Yixun)

  * Further instructions can be found in: 

/RC/group/RC_NIKOS/Eleni/code/source/codeBioFemir

  * Example of running:
       ./FPBNRR 
       --mesh mesh.vtk : Mesh (vtk) generated beforehand with the use of either CBC3D or PODM or another mesh generator having as input the segmented image (MovingMask)
       --pointFileName point.nii.gz : File generated by CannyEdgeDetection code
       --targetPointFileName targetpoint.nii.gz : File generated by CannyEdgeDetection code
       --lambda 5 --searchRadiusX 3 --searchRadiusY 3 --searchRadiusZ 3 --hete 1 : hete's value can be zero or one
       --movingImageFileName preop.nii.gz : Input
       --warpedImageFileName registered.nii.gz : Output
       --MeshDeformationsFileName MeshDeformations.vtk : Output

  * CannyEdgeDetection code execution example to generate point.nii.gz:
       ./CannyEdgeDetection 
       preop.nii.gz 
       0 0 5 
       point.nii.gz
       
  * CannyEdgeDetection code execution example to generate targetpoint.nii.gz:
       ./CannyEdgeDetection 
       intraop.nii.gz 
       0 0 10 
       targetpoint.nii.gz


PBNRR: PBNRR open-source code with CBC3D mesh or PODM mesh

   * Example of running:

./PBNRR preop.nii.gz intraop.gz mask.nii.gz mesh.vtk : Mesh generated beforehand with the use of either CBC3D or PODM or another mesh generator 1 1 1 1 1 1 2 0.05 5 5 4 registered.nii.gz : Output MeshDeformations.vtk : Output

PAPBNRR: Latest version of PAPBNRR

Type ./PAPBNRR for a list of possible parameters to be set.
   
* Example of running:

./PAPBNRR --movingImage preop.nii.gz --fixedImage intraop.nii.gz --segmentedImage mask.nii.gz --outputImage registered.nii.gz : Output --numThreads 1 --meshMethod 1 --HDEvaluation 1 --nonConnectivity 2 --halfBlockSizeX 1 --halfBlockSizeY 1 --halfBlockSizeZ 1 --halfWindowSizeX 3 --halfWindowSizeY 3 --halfWindowSizeZ 3 --numAdaptiveIterations 5 --tumorResection 1 --outputDeformationField deformationField.nii.gz : Output

EVALUATION (HD metric):

- PAPBNRR: Can be set as a flag (--HDevaluation 1) in the user-defined parameters

- RR: The HD calculated by PAPBNRR before the first iteration occurs

- PBNRR:
   Run HDevaluation code located in /RC/group/RC_NIKOS/Eleni/code/source/HDevaluation

   * Example of running:

./HDevaluation preop.nii.gz intraop.nii.gz MeshDeformations.vtk : Generated beforehand by the execution of PBNRR 0 0 5 0 0 10 : These values should be the same as in PAPBNRR movingPoints.nii.gz : Output fixedPoints.nii.gz : Output

- BSpline:
   Run HDevaluation code located in /RC/group/RC_NIKOS/Eleni/code/source/HDevaluation and 
   then run BSplineEvaluation code located in /RC/group/RC_NIKOS/Eleni/code/source/BSplineEvaluation.

   * Example of running:

./HDevaluation preop.nii.gz intraop.nii.gz MeshDeformations.vtk : Use of the file that PBNRR generated for the same case 0 0 5 0 0 10 : These values should be the same as in PAPBNRR movingPoints.nii.gz : Output fixedPoints.nii.gz : Output

   * Next run:

./BSplineEvaluation movingPoints.nii.gz : Generated by HDevaluation code fixedPoints.nii.gz : Generated by HDevaluation code warpedMovingPoints.nii.gz : Output DisplacementField.nii.gz : Displacement field generated by BSpline 16 : Subsampling factor

- NEM:
   Run HDevaluation code located in /RC/group/RC_NIKOS/Eleni/code/source/HDevaluation

   * Example of running:

./HDevaluation preop.nii.gz intraop.nii.gz MeshDeformations.vtk : Generated beforehand by the execution of NEM 0 0 5 0 0 10 : These values should be the same as in PAPBNRR extractedMovingPoints.nii.gz : Output extractedFixedPoints.nii.gz : Output


LANDMARK EVALUATION:

   [Needed: Landmarks set by a doctor for preop, intraop and registered images]

- Vanderbilt error metric: 
   Code located in /RC/group/RC_NIKOS/Eleni/code/source/VanderbiltLandmarkEvaluation
   
   * Calculates:

Shift: The Euclidean distance, L2 norm of the displacement vector of the point in the intraoperative and the preoperative.

Error: The L2 norm of the error vector, which is the displacement vector of the point in the registered and the intraoperative, written as the difference between the predicted shift (shift after registration: registered and preoperative) and the initial shift (intraoperative and preoperative).

Correction Percentage: Taking into account both the initial shift and the shift after registration (through error value), the percent correction is: (1 – error/shift) *100%

- Fotis' metric: 
   Code located in /RC/group/RC_NIKOS/Eleni/code/source/LandmarkEvaluation