Hi Marco,<br><br>The resample filter requires you to provide<br>this default pixel value.<br><br>You could compute "similar" pixels values<br>to what your moving image have in the border,<br>but,.. you will have to do that computation <br>
on your own (for example, by building a mask<br>and using the Statistics Label Map classes).<br><br>Another option is to let your subsequent <br>analysis know that the "default" pixel<br>values are not to be considered.<br>
<br>and<br><br>Another option is to "fill up" the empty<br>spaces of the moving image with values<br>taken from the corresponding pixels <br>of the fixed image (this is just for <br>cosmetic purposes, and it is technically<br>
an incorrect way of completing the image).<br><br><br> Regards,<br><br><br> Luis<br><br>------------------------------------------------------<br><div class="gmail_quote">On Wed, Sep 29, 2010 at 3:56 AM, marco giordano <span dir="ltr"><<a href="mailto:marco.giord@gmail.com">marco.giord@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>Thank you. I see also what is the cause...<br><br>Is there a way to avoid setting the defaultFixelValue to 100 and set it in a way to complete the moving image (e.g. complete the image using the old values of the moving image or some interpolated version of that). I really do not have clear if this would be appropriate but I would like not to have empty/flat spaces in my registered image because they make my slices unusable for analysis.<br>
<br>I hope I explained me clear.<br><br>Thx<br><br><div class="gmail_quote">2010/9/28 Navneeth Subramanian <span dir="ltr"><<a href="mailto:navneeth.s@gmail.com" target="_blank">navneeth.s@gmail.com</a>></span><div>
<div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The cause is seen in line 600:<br>resampler->SetDefaultPixelValue( 100 );<br><br>This is the value being applied during the interpolation of the moving image based on the computed transform.<br>Change it & you're all set.<br>
<br>best,<br><font color="#888888">navneeth</font><div><div></div><div><br><br><div class="gmail_quote">On Sat, Sep 25, 2010 at 1:13 AM, marco giordano <span dir="ltr"><<a href="mailto:marco.giord@gmail.com" target="_blank">marco.giord@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, exactly the last slice of the registered image.<br><br>Is there anyway to limit this effect?<br><br>What if one adds empty slices on the lowest (highest) border? does that affect the registration?<br><br>Thx <br><br>
<div class="gmail_quote">
2010/9/24 Kishore Mosaliganti <span dir="ltr"><<a href="mailto:kishoreraom@gmail.com" target="_blank">kishoreraom@gmail.com</a>></span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
By last image, did you mean the last slice of the registered (moving) image?<br>
<br>
If so, I think this is because of the image transform applied that<br>
moves the image totally out of that image plane. It will happen to the<br>
boundary slices usually.<br>
<br>
Kishore<br>
<div><div></div><div><br>
On Fri, Sep 24, 2010 at 10:56 AM, marco giordano <<a href="mailto:marco.giord@gmail.com" target="_blank">marco.giord@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I have a simple issue that I can not solve neither understand the cause of<br>
> it.<br>
><br>
> I run the Example ImageRegistartion1.cxx on 2 3D CT images (256x256x11)<br>
> modyfing the code to take into account the third dimension and float number<br>
> for representation.<br>
><br>
> Output looks like this:<br>
><br>
> ....<br>
> 25 = 104.112 : [0.097946, -0.00159973, 0.00035025]<br>
> 26 = 104.082 : [0.0979543, -0.00155174, 0.000494857]<br>
> Result =<br>
> Translation X = 0.0979543<br>
> Translation Y = -0.00155174<br>
> Translation Z = 0.000494857<br>
> Iterations = 28<br>
> Metric value = 104.135<br>
><br>
> Registration runs succeffully but I notice in my registrated image that the<br>
> last slice (slice Number 11) is all set to the Deafult Value 100.<br>
><br>
> Is that due to the interpolation or something I did not specify in my code?<br>
><br>
> Is it possible to avoid this effect?<br>
><br>
> Thank you very much.<br>
><br>
><br>
> --<br>
> M. Giordano<br>
><br>
><br>
</div></div>> _____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
><br>
><br>
</blockquote></div></div></div><br><br clear="all"><br>-- <br><font color="#888888">Marco Giordano<br><br>
</font><br>_____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
<br></blockquote></div><br>
</div></div></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Marco Giordano<br><a href="mailto:MSN%3Agilmour812002@yahoo.it" target="_blank">MSN:gilmour812002@yahoo.it</a><br>ICQ :285-118-610<br>
SKYPE:marcogiord81<br>
</font><br>_____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
<br></blockquote></div><br>