[Insight-users] How to get a seed point value

Luis Ibanez luis.ibanez at kitware.com
Wed, 14 Jan 2004 13:37:21 -0500


Hi Sandhya,

Once you have the physical coordinates of the pixel
you map them to an index using the image method

   image->TransformPhysicapPointToIndex( point, index );

    http://www.itk.org/Insight/Doxygen/html/classitk_1_1Image.html#a17

then use the index for invoking  GetPixel() as:


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


The method GetPixel() is described in the SoftwareGuide


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

     Section 4.1.3, pdf-page 64.



Regards,


   Luis



------------------------------
Thimmaiah, Sandhya wrote:

> Hi Luis,
> I was going through the code..it gives the coordinates but if I want to get
> the pixel value..how do I do that??
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
> Sent: Wednesday, January 14, 2004 1:04 PM
> To: Thimmaiah, Sandhya
> Cc: ITK (E-mail)
> Subject: Re: [Insight-users] How to get a seed point value
> 
> 
> 
> 
> Hi Sandhya,
> 
> 
> Please look at the code in
> 
>    InsightApplications/Auxiliary/QtImageViewer
> 
> This demo application is capturing mouse click
> positions in the way that should help define
> seed points.
> 
> The class
> 
>             QtGlImageViewer
> 
> derives from QtGLWidget and has a Qt signal:
> 
> signals:
> 
>    void Position(int, int, int, float);
> 
> This signal is sent form the method
> 
>     clickSelect()
> 
> which is invoked from the mouseEvent() method.
> 
> the mouse coordinates are taken from the
> QMouseEvent as
> 
>           event->x();
>           event->y();
> 
> Then mapped into the index coordinates of the
> image.
> 
> 
> 
> Regards,
> 
> 
>    Luis
> 
> 
> ---------------------
> Thimmaiah, Sandhya wrote:
> 
> 
>>Hello,
>>I am building an application using ITK & Qt.I am trying to implement
>>different segmentation methods in it. I am able to display a dicom image
> 
> in
> 
>>Qt. I need to read the seed point value when i click on the image. I would
>>really appreciate if anyone can give me suggestion. I am using ITK
>>algorithms for this.Thank you
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> 
>