<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Luis,<br><br>&nbsp; Thank you for your reply. Well, the algorithm takes very long. It stops only because it reaches the 500th iteration (the limit). Yes, both are CT images.<br><br>I guess the lungs collapse because I do the registration in one step, instead of using Rigid registration as a precursor.<br><br>My dataset is as such :<br><br>Set 1 : 512 x 512 x 30 (resolution 0.68 x 0.68 x 1.0)<br>Set 2: 512 x 512 x 30 (resolution 1.0 x 1.0 x 1.0)<br><br>The ITK example file has a default spacing of&nbsp; (1, 1, 1) I guess and I had used this earlier, hence the result I guess. <br><br>I have since changed it. But the results are not good. The output image does not have default values in the middle, but the difference images are highly
 speckled. I am not sure why this has happened. I have yet to run enough tests to make sur ethat I do not get any default values in the center slices.<br><br>Also, doesn't ITK automatically get the spacing information from the dicom files ? <br>I wrote a program to read dicom series, generate a .vtk file and rewrite teh dicom series.<br><br>While the output images of this dicom conversion match the input, the .vtk file has wrong spacing information (1, 1, 1) instead of (0.68, 0.68, 1). Hence I am also not able to view it in Volview.<br><br>What happens to the spacing information, is a mystery.<br><br>Any tips how I can solve this ?<br><br>Emma<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<br>To: Emma Ryan &lt;eryanvtk@yahoo.com&gt;<br>Cc: insight-users@itk.org<br>Sent: Thursday, July 5, 2007 1:41:13 PM<br>Subject: Re: [Insight-users] Error in
 Registration results<br><br><div><br>Hi Emma,<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mm... it is hard to explain indeed.<br><br><br>Your intuition is correct regarding the fact that the<br>default pixel value "shouldn't" appear in the middle slices.<br><br>That being said, it is not "impossible" for the value to<br>appear there.&nbsp;&nbsp;The fact that it is appearing, is an indication<br>that one of the nodes in the BSplineGrid has a deformation so<br>large that it sends the point outside of the image physical<br>extent. In other words, the registration failed largely.<br><br>The extreme deformation that the two sliced display are also<br>a bad indication of the results of the registration. For<br>example, the first slice in your email has the lungs collapsed<br>towards the medial plane.<br><br>You should probably rerun the registration by using different<br>parameters for the optimizer. In particular you probably should<br>set the Bound values
 for the parameters of the Transform.<br><br><br>BTW:<br><br>1) How many iterations did the algorithm *actually* ran ?<br><br>2) Where the two images of the same modality ?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;The metric used in this example is MeanSquares,<br>&nbsp;&nbsp;&nbsp;&nbsp;so it pretty much assumes that the images are of<br>&nbsp;&nbsp;&nbsp;&nbsp;the same modality and with a very close distribution<br>&nbsp;&nbsp;&nbsp;&nbsp;of intensity values.<br><br><br><br>&nbsp;&nbsp;Regards,<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<br><br><br><br>-----------------<br>Emma Ryan wrote:<br>&gt; Hi,<br>&gt; <br>&gt;&nbsp;&nbsp; I am trying to register 2 volumes.&nbsp;&nbsp;I use ITK example - <br>&gt; DeformableRegistration7.cxx to do so. The default pixel values is 100. <br>&gt; So any empty space is filled with this grey value.&nbsp;&nbsp;So it is <br>&gt; understandable if the first&nbsp;&nbsp;slice shows this grey region since they are <br>&gt; tyring to align
 along the 'Z' direction. Also, if this grey value <br>&gt; appears along the boundary of the images, it makes sense.<br>&gt; <br>&gt;&nbsp;&nbsp; But how does one explain the appearance of the default grey value <br>&gt; (100) in the center slices.&nbsp;&nbsp;I have attached some images and labelled <br>&gt; them with thier corresponding slice number.<br>&gt; <br>&gt;&nbsp;&nbsp; I thought the problem was with resampling, but that part of the code <br>&gt; seems correct, besides I have used the example cpp file as is.<br>&gt; <br>&gt;&nbsp;&nbsp;I see some of these 'artifacts' in the center slices as well.<br>&gt; Any clue ?<br>&gt; <br>&gt; Emma<br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; Be a better Globetrotter. Get better travel answers <br>&gt; &lt;<a target="_blank"
 href="http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&amp;sid=396545469%3Efrom">http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&amp;sid=396545469&gt;from</a> <br>&gt; someone who knows.<br>&gt; Yahoo! Answers - Check it out.<br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Insight-users mailing list<br>&gt; Insight-users@itk.org<br>&gt; <a target="_blank"
 href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></div></div><br></div></div><br>
      <hr size=1><a href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint customers </a>who are looking for what you sell. 

</body></html>