<div dir="ltr">Hi Ivan,<div><br></div><div>It would need a few modifications:</div><div><br></div><div>First, save the transform parameters from your registration. I.e. GetParameters form your transform object (these might be the matrix numbers you are mentioning).</div><div><br></div><div>For applying the transform to a new image:</div><div>1. Read the transfrom parameters you saved</div><div>2. Instantiate a new transfrom object of the same type as the registration</div><div>3. Set the transfrom parameters with SetParmeters</div><div>4. Create a resampler and set the transform.</div><div>5. Apply the resampler to your new image</div><div><br></div><div>The resampler example provides the basic structure:</div><div><a href="https://itk.org/Wiki/ITK/Examples/ImageProcessing/ResampleImageFilter" target="_blank">https://itk.org/Wiki/ITK/<wbr>Examples/ImageProcessing/<wbr>ResampleImageFilter</a><br></div><div>You would need to change the code to use your specific transformation and set your saved transform parameters.</div><div><br></div><div>Alternatively you could modify ImageRegistration8.cxx to read additional images and apply the same resampler used for your image B to them.</div><div><br></div><div>Another option is to use Slicer3D <a href="https://www.slicer.org/" target="_blank">https://www.slicer.<wbr>org/</a>.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 9, 2017 at 1:08 PM, Ivan Hidrovo <span dir="ltr"><<a href="mailto:ivan.hidrovo@gmail.com" target="_blank">ivan.hidrovo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello all,<br><br></div>We are registering 2 data sets A and B using ImageRegistration8.cxx. We get an output dataset C registered to A and also some matrix numbers which we believe to be the rigid registration parameters.<br><br></div> We need to apply the same registration transformation to another data set (of a different modality) -- is there a way to use this code or another code to apply a given transformation to an image.<br><br></div><div>Or do we need to make small changes to the code to do this.<br><br></div>thanks,<br></div>Ivan<br></div>
<br>______________________________<wbr>_________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/community</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-size:12.8px;color:rgb(136,136,136)">Samuel Gerber</span><br style="font-size:12.8px;color:rgb(136,136,136)"><span style="font-size:12.8px;color:rgb(136,136,136)">R&D Engineer</span><br style="font-size:12.8px;color:rgb(136,136,136)"><span style="font-size:12.8px;color:rgb(136,136,136)">Kitware, Inc.</span><br></div></div>
</div>