[Insight-developers] Re: design problem with VectorImage and
ImageAdaptor ?
Karthik Krishnan
Karthik.Krishnan at kitware.com
Tue Mar 7 16:25:34 EST 2006
Gaetan Lehmann wrote:
>Karthik, Luis,
>
>I get some errors when wrapping VectorImageToImageAdaptor. Some can be
>resolved by a small change in a typedef in ImageAdaptor -
>
>
Is it fixed with this fix ?
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkVectorImageToImageAdaptor.h?root=Insight&r1=1.7&r2=1.8
> void SetPixel(const IndexType &index, const PixelType & value)
> { m_PixelAccessor.Set( m_Image->GetPixel(index), value ); }
>
>give the error
>
>
>
>There is this error message because GetPixel() in VectorImage does not return
>a reference to the pixel:
>
>
GetPixel() in VectorImage cannot return a reference to a pixel. It
returns a VariableLengthVector< T > pixel created on the stack. This is
because the data buffer does not actually contain references and
pointers types of VariableLengthVector< T >, but 'n' pixels of type T
itself.
>An important design problem to use VectorImage with ImageAdaptor ?
>
>
Not really. I was just an example. Since you've wrapped VectorImage and
VariableLengthVector, it should generally suffice.
>Gaetan
>
>
>
More information about the Insight-developers
mailing list