Polygon Code

32 views
Skip to first unread message

atraya narvekar

unread,
Mar 10, 2012, 12:20:47 AM3/10/12
to itksnap-developers
Dear All

I am trying to understand the polygon code. I am currently studying
polygon drawing,polygon interaction mode and polygon scan convert
codes. Do I need to refer to any other files?

Also I would like to know how to get a pixel value when I click on the
image.

please help me

Paul Yushkevich

unread,
Mar 17, 2012, 8:10:35 AM3/17/12
to itksn...@googlegroups.com
I am trying to understand the polygon code. I am currently studying
polygon drawing,polygon interaction mode and polygon scan convert
codes. Do I need to refer to any other files?

It's mostly self-contained, but also see UserInterfaceLogic.cxx and GenericSliceWindow.cxx
 

Also I would like to know how to get a pixel value when I click on the
image.

IRISApplication app = ...
app->GetCurrentImageData()->GetGrey()->GetVoxel()
 

please help me

--
You received this message because you are subscribed to the Google Groups "itksnap-developers" group.
To post to this group, send email to itksn...@googlegroups.com.
To unsubscribe from this group, send email to itksnap-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/itksnap-dev?hl=en.




--
Paul A. Yushkevich, Ph.D.
Assistant Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

atraya narvekar

unread,
Mar 18, 2012, 10:22:06 AM3/18/12
to itksnap-developers
Thanks for replying.

Appreciate your help.

Got a lil frustrated when no one replied.

atraya narvekar

unread,
Mar 24, 2012, 6:43:04 AM3/24/12
to itksnap-developers
Hello sir

Thanks to your help I was able to study the polygon code fully. In
Handle() function we get the x and y values which are stored in the
list type Vertex(structure). I wanted to know if I can find Gradient
Magnitude, Gradient Direction, Intensity Value at that (x,y) co-
ordinate and also apply zero crossing. If this can be done please Tell
me which header files I need to include.

Thanking you

Paul Yushkevich

unread,
Mar 25, 2012, 4:32:28 PM3/25/12
to itksn...@googlegroups.com
You would have to use ITK image gradient filters to interrogate the
gradient direction at a vertex. Have you read the ITK Software Guide?

atraya narvekar

unread,
Mar 26, 2012, 9:24:08 AM3/26/12
to itksnap-developers
Hello sir
I have downloaded Itk software guide. I had gone through those
gradient files like descreterecursivegradientmagniyude and all but i
dint understand how to apply it. Can you please explain me in one two
lines how to use it in external files?? if possible. I am still going
through those files but the guide is kind of vast so i needed only
specific things to study because of time constraints.
> > For more options, visit this group athttp://groups.google.com/group/itksnap-dev?hl=en.

Paul Yushkevich

unread,
Mar 26, 2012, 11:10:51 AM3/26/12
to itksn...@googlegroups.com
Basically, you would create a gradient filter, pass in the image using
SetInput(), execute Update() on the filter, get the result using
GetOutput() on the filter. Then get the value at a voxel location
using GetPixel() on the output image. If you need to interpolate the
gradient vector away from a voxel center, use the
VectorImageLinearInterpolateImageFunction.h class

The use of filters and interpolators is explained early in the ITK
software guide.

atraya narvekar

unread,
Mar 27, 2012, 11:17:09 AM3/27/12
to itksnap-developers
Thank you sir Paul, I'll start reading and experimenting. THANK YOU
very very much.

On Mar 26, 11:10 am, Paul Yushkevich <pau...@mail.med.upenn.edu>
wrote:
Reply all
Reply to author
Forward
0 new messages