[Insight-users] Applying a transform to a VariableLengthVector/VectorImage pixels

David Doria daviddoria at gmail.com
Fri Oct 22 08:11:43 EDT 2010


>
>  You should be able to use an itk::UnaryFunctorImageFilter with a
> custom-defined functor that performs the rotation. This will at least
> save you from iterating manually over the pixels.
>
> Hope that helps,
> Cory
>

Thanks Cory, that was exactly what I was looking for. Here is an example for
anyone interested:
http://www.vtk.org/Wiki/ITK/Examples/Images/UnaryFunctorImageFilter

<http://www.vtk.org/Wiki/ITK/Examples/Images/UnaryFunctorImageFilter>I tried
to show how to convert between a Vector and a VariableLengthVector, but
neither conversion seems to go well. Here is what I tried:
http://www.vtk.org/Wiki/ITK/Examples/VariableLengthVector
<http://www.vtk.org/Wiki/ITK/Examples/VariableLengthVector>(the two
functions VectorToVariableLengthVector() and VariableLengthVectorToVector()
). Can anyone explain how to do this properly?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101022/ddea3e9d/attachment.htm>


More information about the Insight-users mailing list