[Insight-users] read information of pixel

Luis Ibanez luis.ibanez at kitware.com
Fri Jun 19 13:56:40 EDT 2009


Hi Reinaldo,


                  Welcome to ITK !


A) Short answer:

    Please read the "Data Representation" chapter
    of the ITK Software Guide

    htt://www.itk.org/ItkSoftwareGuide.pdf



       ImageType::IndexType index;
       index[0] = 13;
       index[1] = 25;
       index[2] = 58;

       ImageType::PixelType value = image->GetPixel( index );


    This is a slow way of getting pixel values.

    It may be OK, if you are only lookin at one pixel.


B) If you plan to look at *all* the pixels of the image
    then you should use Image Iterators


     Please read the "Image Iterators" chapter
     of the ITK Software Guide

     htt://www.itk.org/ItkSoftwareGuide.pdf


The fact that you are reading the image from a BMP file
is irrelevant.

For instructions on how to read images, please


C) Read the chapter "Reading and Writing Images"
    from the Software Guide



    Regards,


       Luis



------------------------

Reinaldo wrote:
> 
> How do I read the information of a pixel, from an image. Bmp?
> 
> thanks for the help.
> 
> -- 
> REINALDO
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list