[ITK] Passing parameters in image transform
Matt McCormick
matt.mccormick at kitware.com
Fri Jul 22 10:38:26 EDT 2016
Hi,
The parameters of the registration method can be adjusted as desired. See
ITK/Examples/RegistrationITKv4
for a few examples.
HTH,
Matt
On Fri, Jul 22, 2016 at 5:33 AM, Constantinus Spanakis
<c.spanakis83 at gmail.com> wrote:
> I have a new question. I have a typedef
> itk::ImageRegistrationMethod<FixedImageType, MovingImageType >
> RegistrationType; Then I create a pointer RegistrationType::Pointer
> registration=RegistrationType::New();
> In the registration pointer i set the optimization method, the metric and
> the fixedImage and the movingImage, the transform method and a few other
> parameters. After I finish the rigid registration, then I set to the very
> same registration pointer the affine transform. Will the registration
> pointer continue automatically the registration (by executing the
> registration ->Update()) starting from the result of the previous
> registration or must I manually reset the movingImage parameter?
>
> Thank you in advance
>
> On Thu, Jul 21, 2016 at 6:49 PM, Matt McCormick <matt.mccormick at kitware.com>
> wrote:
>>
>> The itk::CompositeTransform:
>>
>> https://itk.org/Doxygen/html/classitk_1_1CompositeTransform.html
>>
>> was designed for this use case. It can be used in this way in the
>> ITKv4 registration framework.
>>
>> HTH,
>> Matt
>>
>> On Thu, Jul 21, 2016 at 11:43 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
>> > It looks like it should. Maybe you could have new instance of
>> > registration
>> > class, to prevent loop dependency. Anyway, it is best to try :D
>> >
>> > On Thu, Jul 21, 2016 at 8:25 AM, Constantinus Spanakis
>> > <c.spanakis83 at gmail.com> wrote:
>> >>
>> >> Hello. I try to do image registration between two images, called
>> >> fixedImage and movingImage using firstly rigid transform and then
>> >> affine
>> >> transform.
>> >>
>> >> After I finish the rigid registration, I want to use the movingImage,
>> >> after it gets transformed due to rigid registration, and use the NEW
>> >> movingImage as the movingimage input of the affine registration. Does
>> >> the
>> >> following code do the trick?
>> >>
>> >>
>> >>
>> >> rigidTransform->SetParameters(registration->GetLastTransformParameters());
>> >> resample->SetTransform(rigidTransform);
>> >> resample->SetInput(movingImageReader->GetOutput());
>> >>
>> >> resample->SetSize(fixedImage->GetLargestPossibleRegion().GetSize());
>> >> resample->SetOutputOrigin(fixedImage->GetOrigin());
>> >> resample->SetOutputSpacing(fixedImage->GetSpacing());
>> >> resample->SetOutputDirection(fixedImage->GetDirection());
>> >>
>> >> registration->SetMovingImage(resample->GetOutput());
>> >>
>> >> _______________________________________________
>> >> Community mailing list
>> >> Community at itk.org
>> >> http://public.kitware.com/mailman/listinfo/community
>> >>
>> >
>> >
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>> >
>
>
More information about the Community
mailing list