<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-CH" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hallo,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I forward again my previous email hoping for a reply.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Within the context of intensity based 2D-3D registration, can RayCastInterpolateImageFunction be used with ImageRegistrationMethodv4, as the other interpolators listed in the manual? RayCastInterpolateImageFunction
 is not in the manual as the other interpolators: does this mean that has not been implemented for use with ImageRegistrationMethodv4 (given that my code does not seem to work)?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The problem why my code does not work is apparently not a memory issue (I tried with a very very small 3D volume and the registration still does not work).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thank you!</span><span lang="EN-US" style="color:#1F497D;mso-fareast-language:DE-CH"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:DE-CH">From:</span></b><span lang="EN-US" style="mso-fareast-language:DE-CH"> D'Isidoro Fabio
<br>
<b>Sent:</b> Freitag, 11. November 2016 13:37<br>
<b>To:</b> insight-users@itk.org<br>
<b>Subject:</b> intensity based 2d 3d registration<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hallo,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I work on itk V4.10 (latest version) with Python wrapping. I am trying to implement a basic intensity-based 2d3d registration, with a 3D translation as transform and without multi-level or multi-stage registration.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I could successfully reproduce with Python wrapping the DRR generation code (DigitallyReconstructedRadiograph1.cxx) and the 3D-3D registration examples on the ITK manual (ImageRegistration8.cxx).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have combined now both for my 2D-3D registration, based on the template I found on [1]. This template is however based on registration method v3 and is more complex than the basic version I am trying to implement (because
 it involves the Euler transform and multi-level approach).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My basic version (in attachment) does not work, sometimes showing a “Failed to allocate memory for image” and sometimes Python just crashes (I could not figure out the reason for this difference). I connected all components
 (optimizer, metric, fixed and moving interpolator) the way I believe it makes sense, but I am not sure whether ImageRegistrationMethodv4 supports the RayCastInterpolateImageFunction and how it wants it to be connected and initialized. The code fails at the
 registration.Update() command after a few seconds of running. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My 3D volume is a 54 MB CT scan (360X450X160), I have reduced it from the original one to try to avoid memory allocation problems.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is my code wrong? Also, how can I debug it if I can’t put breakpoints “inside registration.Update()”?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Looking forward to your help. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Fabio.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE-CH">[1] </span>
<a href="https://github.com/InsightSoftwareConsortium/ITKApps/blob/master/IntensityBased2D3DRegistration/IntensityBased2D3DRegistration.cxx"><span lang="EN-US" style="mso-fareast-language:DE-CH">https://github.com/InsightSoftwareConsortium/ITKApps/blob/master/IntensityBased2D3DRegistration/IntensityBased2D3DRegistration.cxx</span></a><span lang="EN-US" style="mso-fareast-language:DE-CH"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:DE-CH"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>