<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap:break-word; color:rgb(0,0,0); font-size:14px; font-family:Calibri,sans-serif">
<div>Tim,</div>
<div><br>
</div>
<div>The moving image is not “pushed into the space of the fixed image” it is “pulled into the space of the fixed image” Displacement fields are defined in the space of the “fixed” image, and at each location of the fixed image the displacement field describes
 the offset physical location in the moving image that is interpolated.</div>
<div><br>
</div>
<div>Hans</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; border-bottom:medium none; border-left:medium none; padding-bottom:0in; padding-left:0in; padding-right:0in; border-top:#b5c4df 1pt solid; border-right:medium none; padding-top:3pt">
<span style="font-weight:bold">From: </span>Tim Bhatnagar <<a href="mailto:tim.bhatnagar@gmail.com">tim.bhatnagar@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Monday, December 9, 2013 at 8:06 AM<br>
<span style="font-weight:bold">To: </span>Bradley Lowekamp <<a href="mailto:brad@lowekamp.net">brad@lowekamp.net</a>><br>
<span style="font-weight:bold">Cc: </span>insight-users <<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Insight-users] inverting a deformation field - problem<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>I appreciate the response, Brad.<br>
<br>
</div>
Can you tell me how the implementation of the 'WarpImageFilter' works, such that when I input my Demons-generated displacement field, and my 'movingImage' (from Demons) as input, I get what looks like my 'fixedImage' (from Demons) as output... making me think
 that the displacement field is actually mapping my movingImage into my fixedImage?<br>
<br>
</div>
Also, I use Paraview to visualize my field, and when visualized, it illustrates what you are suggesting (the mapping that would take fixed -> moving). But how then, does the WarpFilter use the SAME FIELD to warp my movingImage into a very nice estimation of
 my fixedImage?<br>
<br>
</div>
Sorry if any of that is convoluted..<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Dec 9, 2013 at 6:00 AM, Bradley Lowekamp <span dir="ltr">
<<a href="mailto:brad@lowekamp.net" target="_blank">brad@lowekamp.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div style="word-wrap:break-word">Hello,
<div><br>
</div>
<div>It not uncommon for resampling-type algorithms to have some points be mapped out side the the domain. This is why a boundary condition and extrapolators are used. If there are just a limited number of pixel being mapped out side, then the simplest way
 be by to just check if the pixel is within the image's region.</div>
<div><br>
</div>
<div>ITK's registration frameworks solve for a transform which maps from the "Fixed" image to the "Moving" image. This is well described int Chapter Eight of the old Software guide:</div>
<div><br>
</div>
<div><a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a></div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<div>
<div>
<div class="h5">
<div>On Dec 8, 2013, at 6:38 PM, Tim Bhatnagar <<a href="mailto:tim.bhatnagar@gmail.com" target="_blank">tim.bhatnagar@gmail.com</a>> wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>Hello,<br>
<br>
</div>
I've created a displacement field via Demons non-rigid registration. I am now trying to create the inverse (using InverseDisplacementFieldImageFilter), but when I am using the indexes to ascribe the inverted field, my program crashes mid-way through, because
 it appears I am trying to call a <b>negative</b> index (specifically, the 3rd index parameter.. the 'z'-parameter).<br>
<br>
I don't do anything to the displacement field except write it to a vtk file before i invert it.. can anyone suggest a solution? I thought I could try and specify the 'direction' of the field, but I'm not sure where in my pipeline I can set the direction of
 the <b>inverted</b> displacement field...<br>
<br>
</div>
sorry if that's messy.. any thoughts would be appreciated!<br>
<br>
Thanks,<br>
<br>
Tim<br clear="all">
<div><br>
-- <br>
Tim Bhatnagar<br>
PhD Candidate<br>
Orthopaedic Injury Biomechanics Group<br>
Department of Mechanical Engineering<br>
University of British Columbia<br>
<br>
Rm 5000 - 818 West 10th Ave.<br>
Vancouver, BC<br>
Canada<br>
V5Z 1M9<br>
<br>
Ph: <a href="tel:%28604%29%20675-8845" value="+16046758845" target="_blank">(604) 675-8845</a><br>
Fax: <a href="tel:%28604%29%20675-8820" value="+16046758820" target="_blank">(604) 675-8820</a><br>
Web: <a href="http://oibg.mech.ubc.ca/" target="_blank">oibg.mech.ubc.ca</a><br>
</div>
</div>
</div>
</div>
<div class="im">_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Tim Bhatnagar<br>
PhD Candidate<br>
Orthopaedic Injury Biomechanics Group<br>
Department of Mechanical Engineering<br>
University of British Columbia<br>
<br>
Rm 5000 - 818 West 10th Ave.<br>
Vancouver, BC<br>
Canada<br>
V5Z 1M9<br>
<br>
Ph: (604) 675-8845<br>
Fax: (604) 675-8820<br>
Web: <a href="http://oibg.mech.ubc.ca" target="_blank">oibg.mech.ubc.ca</a><br>
</div>
</div>
</div>
</span><br>
<br>
<hr>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any
 retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
<hr>
</body>
</html>