[Insight-users] Error while trying to read a vector image using VariableLengthVector

David Doria daviddoria at gmail.com
Sat Nov 19 20:29:29 EST 2011


On Sat, Nov 19, 2011 at 8:22 PM, ravikiranj <ravikiran.j.127 at gmail.com> wrote:
>
> Actually the number of values I need to write per pixel varies from 0..5000
> but the average number of components per pixel maybe like 20-30 (highly
> sparse, compared to max component = 5000). If I understand correctly, Vector
> Image will first allocate 5000 components per pixel irrespective of I use it
> or not (I think I know this because I'm getting out of memory error during
> allocation of image). Is there a way I can write say 1 component for first
> pixel, 20 components for second pixel and then 1000 components for 3rd pixel
> and so on.. ?
>
> I set an initial vector length and try pixelValue.SetSize(newsize, false)
> for variable components and write the vector image, but after reading it
> back, it has the same no. of components as initial vector length.
>
> Regards,
>  Ravikiran

Ah, I see what you're saying. As far as I know that is not possible -
I'll let the experts take it from here if it is.

David


More information about the Insight-users mailing list