[Insight-users] Filtering all channels of a VectorImage

David Doria daviddoria at gmail.com
Wed Apr 27 14:20:42 EDT 2011


On Wed, Apr 27, 2011 at 3:27 AM, Julien Malik <julien.malik at c-s.fr> wrote:
> Hello,
>
> We have such a filter in OTB.
> You might want to check :
> http://hg.orfeo-toolbox.org/OTB/file/94265b241df9/Code/BasicFilters/otbPerBandVectorImageFilter.h
> http://hg.orfeo-toolbox.org/OTB/file/94265b241df9/Code/BasicFilters/otbPerBandVectorImageFilter.txx
>
> Julien

I took the liberty of pulling everything necessary out of OTB so you
guys can easily look at the implementation:
http://review.source.kitware.com/#change,1521

I don't know about the inside, but the interface is FANTASTIC!

typedef itk::MeanImageFilter<ImageType, ImageType> MeanFilterType;
typedef itk::ChannelByChannelVectorImageFilter<VectorImageType,
VectorImageType, MeanFilterType>
ChannelByChannelVectorImageFilterType;

David


More information about the Insight-users mailing list