[Insight-users] (no subject)
Luis Ibanez
luis.ibanez at kitware.com
Sat Feb 19 18:54:09 EST 2011
Hi John,
1) Yes, in the case of the PNG file format
you have to read the entire image.
For some other formats you could take
advantage of streaming, and read only
a block of the image.
2) You essentially need this example:
http://www.itk.org/Wiki/ITK/Examples/Inspection/PixelInspection
Luis
-----------------------------------------
On Wed, Feb 16, 2011 at 1:21 PM, john smith <mkitkinsightuser at gmail.com> wrote:
> I have a .png image file in the source directory and I want to get the data
> of one pixel of the image and see the results on the Command Window (if it
> is possible) or on another file (such as a .txt file) . Firstly, I am
> wondering if it is necessary to read the hole Image by using a
> ImageFileReader, or I can get the data I want just with the using of
> itkIndex.
>
> 2011/2/16 David Doria <daviddoria at gmail.com>
>>
>> On Wed, Feb 16, 2011 at 12:50 PM, john smith <mkitkinsightuser at gmail.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> I am beginner in using itk and I am trying to get the pixel value of a 2D
>>> image. As a first step, I am trying to create my own image object, to
>>> initialize and allocate the image region, and finally using the itkIndex to
>>> get and set a pixel value (knowing that is not the fastest method). I have
>>> written the following code, which is correctly built using VisualStudio2010
>>> and Cmake. But when I run the .exe file with the Command Prompt window, I
>>> don't get any result on my screen. Could somebody tell me what to do to get
>>> some results?
>>> In the second step, I would like to set the filename of the image myself,
>>> using the Command Prompt window. Could somebody tell me what to change in my
>>> code, not only in the .cxx file but also in thr CMakeLists.txt?
>>>
>>> Thanks in advance
>>>
More information about the Insight-users
mailing list