[Insight-users] Getting size of an image in a file

Jolinda Smith jolinda at darkwing . uoregon . edu
Fri, 16 May 2003 09:33:31 -0700


Thanks! GetDimensions() and GetSpacing() also look useful.


> Hi Jolinda,
>
> The ImageIOBase class and some of its derived classes
> define the following methods:
>
> - GetImageSizeInBytes();
> - GetImageSizeInComponents();
> - GetImageSizeInPixels();
>
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html
>
> The values are probably valid only after reading
> the image into memory.
>
> If you are using the ImageFileReader, you may have to read the image,
> then get the ImageIO object from the ImageFileReader and finally query
> it using the methods above.
>
>
> Regards,
>
>
>     Luis
>
>
> ---------------------
> Jolinda Smith wrote:
> > Hi all,
> >
> > If I want to know the size of an image in a file, do I have to:
> >
> > 1. read the image
> > 2. get the largest possible region from that image
> > 3. get the size of that region
> >
> > or is there another way?
> >
> > Jolinda Smith
> > Lewis Center for NeuroImaging
> > University of Oregon
> > jolinda@uoregon.edu
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users@public.kitware.com
> > http://public.kitware.com/mailman/listinfo/insight-users
> >
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>