<div dir="ltr">Hi Matt, thanks for your help.<div><br></div><div style>To do this I must therefore load my displacement field as a transform and use </div><div style><br></div><div style> CompositeTransform->AddTransform(affine);</div>
<div>  CompositeTransform->AddTransform(DisplacementFieldTransform);</div><div><br></div><div style>How can I then write this out as a deformation field?</div><div><br></div><div><br></div><div style>Would you then suggest using    #include "itkTransformToDisplacementFieldSource.h" ?</div>
<div style><br></div><div style>Thanks</div><div style><br></div><div style>Emma</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 8:11 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Emma,<br>
<br>
In ITKv4, there is a much nicer way of doing this with the<br>
CompositeTransform [1].  Load the AffineTransform and<br>
DisplacementFieldTransform and add them to a CompositeTransform with<br>
AddTransform() [2].<br>
<br>
Hope this helps,<br>
Matt<br>
<br>
[1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html</a><br>
[2]<a href="http://www.itk.org/Doxygen/html/classitk_1_1MultiTransform.html#a698cf2434061a797bca49ed32a46cab9" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1MultiTransform.html#a698cf2434061a797bca49ed32a46cab9</a><br>

<div><div class="h5"><br>
On Tue, Jan 28, 2014 at 3:02 PM, Emma Saunders<br>
<<a href="mailto:emmasaunders123@gmail.com">emmasaunders123@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I have an affine transform as a .txt file and a deformation field as .mha.<br>
> I would like to find a composite transform of each.<br>
><br>
> At the moment I convert the affine to a deformation field using<br>
> "itkTransformToDisplacementFieldSource.h"<br>
><br>
> and then compose it with the displacement field using:<br>
><br>
> "itkComposeDisplacementFieldsImageFilter.h"<br>
><br>
> Is there a more succinct way to do this in the new framework><br>
><br>
> Many thanks<br>
><br>
> Emma<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.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>
><br>
> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org">Community@itk.org</a><br>
> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
><br>
</blockquote></div><br></div>