[Insight-developers] Re: design problem with VectorImage and
ImageAdaptor ?
Karthik Krishnan
Karthik.Krishnan at kitware.com
Tue Mar 7 18:40:47 EST 2006
Gaetan Lehmann wrote:
>
>>Is it fixed with this fix ?
>>http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkVectorImageToImageAda
>>ptor.h?root=Insight&r1=1.7&r2=1.8
>>
>>
>>
>
>Yes, it builds, with
>
> typedef typename TImage::InternalPixelType InternalPixelType;
>
>in itkImageAdaptor.h, instead of
>
> typedef typename TAccessor::InternalType InternalPixelType;
>
>
>
>
That would not work. The typedefs are not equivalent. The former is type
T. The latter is VariableLengthVector< T >
>I'm using ITK 2.4.1. ITK cvs would solve that problem ?
>
>
ITK2-4-1 and CVS is probably in the same state for the wrappers for the
VectorImageToImageAdaptor class.
>>Not really. I was just an example. Since you've wrapped VectorImage and
>>VariableLengthVector, it should generally suffice.
>>
>>
>>
>
>How do you extract a normal image from a vector image without it ?
>
>
>
Just an iterator. In fact, we've been forced to do this in most cases.
Lines 291-315.
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Algorithms/itkBayesianClassifierImageFilter.txx?annotate=1.4&root=Insight
itrPosteriorImage is an iterator on a VectorImage.
extractedComponentImage is an extracted component.
Here the intent was to smooth each component and Anisotropic diffusion
filters will not work on non-scalar images. Adaptors might help save
memory, but IMHO once you put them in a pipeline for a filter that works
on image regions, the price you pay for non-contiguous memory access
would outweigh it, (I think).
-karthik
>
>
>
More information about the Insight-developers
mailing list