Difference between revisions of "BRAINSFit to simpleITK"

From NAMIC Wiki
Jump to: navigation, search
(Created page with '{| class="toccolours" style="margin-left: 15px" align="right" ! bgcolor="#ccccff" align="center" | Editing Guide |- | Getting Started |- | [[Edi…')
 
 
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="toccolours" style="margin-left: 15px" align="right"
+
=Goal=
! bgcolor="#ccccff" align="center" | Editing Guide
+
 
|-
+
We are developing registration module in Slicer version 4 (which is using ITKv4) for deformable registration of prostate MRI.
|
+
 
[[Editing_Guide:Getting_Started|Getting Started]]
+
We want to develop a SimpleITK prostate registration tool in Slicer4/ITKv4. This Slicer4/ITKv4 registration tool should be functional, accurate and fast (i.e., comparable with the  the functionality we had in Slicer3/ITKv3, which has been evaluated previously [1]).
|-
+
 
|
+
=Details on the registration approach=
[[Editing_Guide:Edit_Existing_Page|Edit Existing Page]]
+
Registration is applied to align preprocedural and intraoperational MR T2 image volumes. We are using masks the prostate for both image data sets. Registration is done using MMI metric with rigid, affine and B-spline stages applied in sequence. In Slicer3/BRAINSFit we use gradient descent for rigid/affine, and LBFGS for B-spline.
|-
+
 
|
+
Parameters we are using to call BRAINSFit in Slicer 3.6 [https://docs.google.com/spreadsheets/d/1eWAPVe2cSAEr3FL-AhaqXaBuG-760Th7SUzb2KGAwfE/edit#gid=0 can be found here].
[[Editing_Guide:Text_Formatting|Text Formatting]]
 
|-
 
|
 
[[Editing_Guide:TOCs_and_Headers|TOCs and Headers]]
 
|-
 
|
 
[[Editing_Guide:Links|Links]]
 
|-
 
| '''Add New Page/Link'''
 
|-
 
|
 
[[Editing_Guide:Uploading_Documents_and_Images|Uploading Documents and Images]]
 
|}
 
  
Typically users want to create new pages that are linked to existing pages. Sometimes users also think of this as wanting to create a new link in the wiki. Same thing. New pages are created in wikis, and then those are linked to existing pages. For example, you may want to create a page for a meeting you are hosting on Jan 10th, 2006, and put a link to that meeting page in the AMIGO page. Or you may think that you want to create a new link for your Jan 10th, 2006 meeting from the AMIGO page. Here is how you will make this happen:
+
Sample data [http://www.slicer.org/publications/item/view/2147 can be found here].
  
'''Short answer:'''
+
=Current status=
  
* Add the following line to the existing page (in this case the AMIGO Page) where you want the link:
+
Registration code on github: [https://github.com/PeterBehringer/SimpleITKtraining/blob/master/BRAINSFit_to_sitk_MMI.py here]
  
<nowiki> [[Meeting_BWH_2006_01_10|BWH Meeting Jan 10, 2006]] </nowiki>
+
'''Latest update: April 28, 2015'''
  
* Save the existing (AMIGO) page
+
==Things that are working==
* When you look at the existing (AMIGO) page, there will be a red link labeled "BWH Meeting Jan 10, 2006" - this is the new empty link/page you have just created. If you click on it, you will automatically go to the edit tab for the new page, which means that you can now just start editing the new page you just created.
+
* exhaustive search based initialization procedure implemented and produces good results (cross-correlation metric)
  
'''Longer answer:'''
+
==Things that are implemented, but are not working==
 +
* SimpleITK code for rigid registration
 +
** the voxel sampling exception can be avoided by cropping the images sharply around the masks.
 +
{|
 +
|
 +
|[[Image:FixedVolume.png|thumb|300px|Fixed Volume as Reference]]
 +
|[[Image:AfterInit.png|thumb|300px|SimpleITK result after Initialization]]
 +
|[[Image:AfterRigid.png|thumb|300px|SimpleITK result after rigid registration]]
 +
|[[Image:BRAINSFitOut.png|thumb|300px|BRAINSFit result after rigid without using masks and --useCenterOfGeometryAlign]]
 +
|}
 +
** The rigid registration result is too much rotated and translated. Also the number of iteration steps varies with every computation. Reason might be that seed is set randomized and not set as done in BRAINSFit [https://github.com/BRAINSia/BRAINSTools/blob/af0ff12b8b751f9423061d42178268acab5f85f4/BRAINSCommonLib/BRAINSFitHelper.h#L375 here]. There is no option at the [http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageRegistrationMethod.html SimpleITK::ImageRegistrationMethod] to set a metric seed.
  
To create a new page (or what sometimes people think of as a new link) for your meeting on Jan 10th, 2006 and a link to the AMIGO page, here is what you need to do:
+
==Things that are not implemented, but need to be implemented==
 +
* SimpleITK code for affine registration
 +
** setting affineOptimizer [https://github.com/BRAINSia/BRAINSTools/blob/19fa37dfbdee37deff4ccee412bb601f7a787bda/BRAINSCommonLib/genericRegistrationHelper.hxx#L158-L187 here]
 +
** setting RegistrationMethod [https://github.com/BRAINSia/BRAINSTools/blob/19fa37dfbdee37deff4ccee412bb601f7a787bda/BRAINSCommonLib/genericRegistrationHelper.hxx#L289-L353 here]
 +
* SimpleITK code for BSpline registration (started [https://github.com/PeterBehringer/SimpleITKtraining/blob/master/simpleITK_to_sitk_BSpline.py here])
  
* Decide on a title for your page. In this case, let's pick the title Meeting_BWH_2006_01_10.
+
=Unresolved issues out of our direct control=
* Decide on how you want to refer to this page in the existing AMIGO page. In this case, let's refer to this as "BWH Meeting Jan 10, 2006"
+
==Standing SimpleITK issues==
* Go to the existing page where you want to create this link, in this case the AMIGO page. Start editing that page by clicking on the '''Edit''' tab. In the text, go where you want to add the link for your meeting, and add the following line
+
* no API for consistent initialization of the metric seed
 +
*
  
<nowiki> [[Meeting_BWH_2006_01_10|BWH Meeting Jan 10, 2006]] </nowiki>
+
==Standing ITKv4 issues==
 +
* capability to sample voxels only within the mask (see topic under review on Gerrit: http://review.source.kitware.com/#/c/19684/)
 +
*
  
* Save the page. Note that the line you just added has four components:
+
==Standing Slicer4 issues==
** it starts with two left square brackets to indicate the start of a link, and ends with two right square brackets to indicate the end
+
=References=
** then has the title of the new page you want to create, in this case Meeting_BWH_2006_01_10
+
[1] Fedorov A, Tuncali K, Fennessy FM, Tokuda J, Hata N, et al. (2012) Image registration for targeted MRI-guided transperineal prostate biopsy. J Magn Reson Imaging 36: 987–992. Available: http://dx.doi.org/10.1002/jmri.23688.
** then it has a vertical bar (|) as a separator
 
** then it has the text by which you want to refer to this new page, in this case BWH Meeting Jan 10, 2006.
 
* When you look at the AMIGO page, there will be a red link labeled "BWH Meeting Jan 10, 2006" - this is the new empty link/page you have just created. If you click on it, you will automatically go to the edit tab for the new page, which means that you can now just start editing the new page you just created.
 

Latest revision as of 02:33, 1 May 2015

Home < BRAINSFit to simpleITK

Goal

We are developing registration module in Slicer version 4 (which is using ITKv4) for deformable registration of prostate MRI.

We want to develop a SimpleITK prostate registration tool in Slicer4/ITKv4. This Slicer4/ITKv4 registration tool should be functional, accurate and fast (i.e., comparable with the the functionality we had in Slicer3/ITKv3, which has been evaluated previously [1]).

Details on the registration approach

Registration is applied to align preprocedural and intraoperational MR T2 image volumes. We are using masks the prostate for both image data sets. Registration is done using MMI metric with rigid, affine and B-spline stages applied in sequence. In Slicer3/BRAINSFit we use gradient descent for rigid/affine, and LBFGS for B-spline.

Parameters we are using to call BRAINSFit in Slicer 3.6 can be found here.

Sample data can be found here.

Current status

Registration code on github: here

Latest update: April 28, 2015

Things that are working

  • exhaustive search based initialization procedure implemented and produces good results (cross-correlation metric)

Things that are implemented, but are not working

  • SimpleITK code for rigid registration
    • the voxel sampling exception can be avoided by cropping the images sharply around the masks.
Fixed Volume as Reference
SimpleITK result after Initialization
SimpleITK result after rigid registration
BRAINSFit result after rigid without using masks and --useCenterOfGeometryAlign
    • The rigid registration result is too much rotated and translated. Also the number of iteration steps varies with every computation. Reason might be that seed is set randomized and not set as done in BRAINSFit here. There is no option at the SimpleITK::ImageRegistrationMethod to set a metric seed.

Things that are not implemented, but need to be implemented

  • SimpleITK code for affine registration
    • setting affineOptimizer here
    • setting RegistrationMethod here
  • SimpleITK code for BSpline registration (started here)

Unresolved issues out of our direct control

Standing SimpleITK issues

  • no API for consistent initialization of the metric seed

Standing ITKv4 issues

Standing Slicer4 issues

References

[1] Fedorov A, Tuncali K, Fennessy FM, Tokuda J, Hata N, et al. (2012) Image registration for targeted MRI-guided transperineal prostate biopsy. J Magn Reson Imaging 36: 987–992. Available: http://dx.doi.org/10.1002/jmri.23688.