[Insight-users] generating a vector Image

Hila Hiler hilahiler at gmail.com
Fri May 18 13:41:59 EDT 2012


Dear David,

many thanks for your effort to help.

I found the problem: a large amount of memory space was required to
generate about 100*3MB for a vector image(100MB for an image (pixeltype of
double) and multiply by three for three vector length) .
I use a laptop and maybe it was a problem.
so I simply cropped my input image to 60MB and the final size was ~180MB
for a vector image.

if you have something in mind to sharp my observation- please mention it
... I have to change a computer?
any information would be very appreciated!

Best Regards,
Hila


On Fri, May 18, 2012 at 6:32 PM, David Doria <daviddoria at gmail.com> wrote:

> > vectorImage->SetVectorLength(vectorLength);
> > vectorImage->SetSpacing(vec_spacing);
> >
> > It shouldn't be?:
> >
> >
> > typedef itk::Image<unsigned short, 3>  ImageType;
> >
> > void CreateImage(ImageType* const image)
> > {
> >  ImageType::IndexType start;
> >  start.Fill(0);
> >
> >  ImageType::SizeType size;
> >  size[0] =202; size[1] =419; size[2] = 157;
> >
> > image->SetSpacing(vec_spacing);
> > image->SetRegions(region);
> > image->SetVectorLength(vectorLength);
> > image->Allocate();
> > }
>
> I was trying to make you an image of your input type:
>
> typedef    itk::Image    < pixelType, myDimension >  ImageType;
>
> so that you could try to convert it to the itk::VectorImage that you
> want. The spacing shouldn't matter for this (trying to make the
> example as simple as possible), and SetVectorLength is something that
> you need to do in your conversion code, not in this code to create a
> dummy image.
> typedef    itk::Image    < pixelType, myDimension >  ImageType;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120518/9be958fa/attachment.htm>


More information about the Insight-users mailing list