[Insight-users] resampler

Luis Ibanez luis.ibanez at kitware.com
Tue May 2 16:56:28 EDT 2006


Hi Marius,

Thanks for pointing this out.

Actually the if/else-if style is discouraged in the coding style of ITK,
so I replaced with full "if" statements and each one with its respective
return.

Note that there are other transforms that will qualify as "linear" and
are not included here yet.  In particular the Scale transform and the
VersorTransform. They are less commonly used...though.

As a general practice it doesn't seem right to overpopulate the
Resample filter all the transforms available in ITK. We probably
can add a "Trait" to the transform for defining when they are
"Linear", and  allowing the ResampleImageFilter to decide what
method to use for the invocation of the transform.



   Regards,


      Luis


------------------
Marius Staring wrote:
> hi Luis,
> 
> you might want to change the
> 
> if (dynamic_cast<const TranslationTransformType 
> *>(m_Transform.GetPointer()))
> 
> to
> 
> else if (dynamic_cast<const TranslationTransformType 
> *>(m_Transform.GetPointer()))
> 
> 
> for the sake of consistency.
> 
> And then you can get rid of all the return's.
> 
> Regards,
> 
> Marius
> 
> 
> Luis Ibanez wrote:
> 
>>
>> Hi Stefan,
>>
>> The TranslationTransform has now been added to the code of the
>> ResampleImageFilter, in order to make it use the fast cycle of
>> point coordinates mapping.
>>
>> You may want to update your CVS checkout of ITK:
>> http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkResampleImageFilter.txx?root=Insight&sortby=date&r2=1.53&r1=1.52 
>>
>>
>> Please let us know if you find any problems,
>>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>>
>> =====================
>> Stefan Klein wrote:
>>
>>>
>>> Hi,
>>>
>>> The itkResampleImageFilter takes smart advantage of linear 
>>> transforms.  >From line 187-206 in the .txx file it seems that the 
>>> TranslationTransform is not considered a linear transform. Is this 
>>> done on purpose, or is it a mistake?
>>>
>>> Best regards,
>>> Stefan.
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
> 




More information about the Insight-users mailing list