<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi<BR>
<BR>
Thank you for your help. <BR>
<BR>
No, i dont have a list of indices.<BR>
I just used the LineConstIterator to draw a line between my two points. <BR>
now i need check the gray-level value between these two points and find the pixel with the maximun gray-level value on that line.<BR>
so i want my output to be an index.<BR>
should i make an if loop inside the while loop that checks for the highest value?<BR>
<BR>
Thanks . <BR>
<BR>
<BR> <BR>
> Date: Sun, 1 May 2011 19:04:45 -0400<BR>> Subject: Re: [Insight-users] Gradient Magnitude<BR>> From: daviddoria@gmail.com<BR>> CC: xlolla28x@hotmail.com; insight-users@itk.org<BR>> <BR>> On Sun, May 1, 2011 at 6:57 PM, Neil Panjwani <paniwani@gmail.com> wrote:<BR>> > If you know the indexes of the line, you could use the image region iterator<BR>> > with index to scan those indices and find the highest value using an if<BR>> > statement.<BR>> <BR>> Here is an example of what Neil suggested (you'd have to check<BR>> "iterator.GetIndex() == AnyOfYourIndices" for every pixel visited by<BR>> the iterator):<BR>> http://www.vtk.org/Wiki/ITK/Examples/Iterators/ImageRegionIteratorWithIndex<BR>> <BR>> If you have the end points of the line rather than the list of indices<BR>> composing the line, you could use this:<BR>> http://www.vtk.org/Wiki/ITK/Examples/Iterators/LineConstIterator<BR>> <BR>> David<BR>                                            </body>
</html>