[Insight-users] Rigid registration with translation restricted to single axis?

Luis Ibanez luis.ibanez at kitware.com
Mon May 24 13:00:04 EDT 2010


Hi George,

Please see comments below.


    Thanks


            Luis



--------------------------------------
On Mon, May 24, 2010 at 12:54 PM, g c <gc12358 at googlemail.com> wrote:
> Hi Luis,
>
> Thanks for your suggestions, I have tried your option A)
>
> One additional thing I needed to change was
>
> virtual unsigned int GetNumberOfParameters(void) const
>    { return NDimensions; }
>
> into
>
> virtual unsigned int GetNumberOfParameters(void) const
>    { return ParametersDimension; }
>
--------------------------------

Yes, good point.
It actually should be this way in
the TranslationTransform too...

--------------------------------
>
>
> Also, I'm wondering about
>
> SetParameters
>
> and
>
> GetParameters
>
> where I changed the loops from
>
> for( unsigned int i=0; i<SpaceDimension; i++ )
>
> into
>
> for( unsigned int i=0; i<ParametersDimension; i++ )
>
> Would that be correct?
>
>
--------------------------------


Yes, that will be correct.


-------------------------------
>
> thanks again,
>
> George
>
>
> On 24 May 2010 16:23, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> Hi George,
>>
>> You are correct.
>> This is fairly easy to accomplish.
>>
>> The main two options are:
>>
>> A) Write a customized Transform class.
>>
>> B) Use the Scaling parameters of the optimizer.
>>    along with a standard Translation Transform.
>>
>>
>> Option (B) will mostly "discourage" the optimizer
>> from moving along one of the axis. So, if you really
>> want to enforce a single axis movement, then
>> option (A) is your best bet.
>>
>>
>> You basically has to copy/paste the current
>> itkTranslationTransform class into a new one
>>
>> and modify:
>>
>> 0)    Make this new transform derive from itkTranslationTransform
>>
>> 1)    itkStaticConstMacro(ParametersDimension, unsigned int, NDimensions);
>>       to be
>>       itkStaticConstMacro(ParametersDimension, unsigned int, 1 );
>>
>> 2)   Overload the methods
>>
>>      SetParameters()
>>      GetParameters()
>>      GetJacobian()
>>
>>
>>
>>
>>   Regards
>>
>>
>>        Luis
>>
>>
>> -------------------------------------------------------------------
>> On Mon, May 24, 2010 at 7:53 AM, g c <gc12358 at googlemail.com> wrote:
>>> Hi,
>>>
>>> I would like to rigidly register two 2D images, where the translation
>>> should be restricted to a single axis (say the x-axis). I suppose this
>>> should be fairly straightforward, perhaps by modifying the
>>> itk::TranslationTransform class? Has anyone already done this before?
>>> Any suggestion appreciated.
>>>
>>> Best regards,
>>>
>>> George
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>


More information about the Insight-users mailing list