<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am working on a problem which requires the access of certain values(every 5<sup>th</sup> value) from an “index” array.</p>
<p class="MsoNormal">This is the part of the code which fetch the pointset of the pixels which are white in the image. The pointset are stored in “index”.</p>
<p class="MsoNormal">Outside the for loop, I want to access every 5<sup>th</sup> value from the array index[0] (x-values) and from array[1] (y-values).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas; color:green">//code</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas">InputImageType::IndexType index;</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas; color:blue">int</span><span style="font-size:9.5pt; font-family:Consolas"> i,j;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas; color:blue">for</span><span style="font-size:9.5pt; font-family:Consolas"> (i=0;i<size_x;i++){</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas">
<span style="color:blue">for</span> (j=0;j<size_y; j++){</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> index[0]=i;
<span style="color:green">// x-values</span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> index[1]=j;
<span style="color:green">// y-values</span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas">InputImageType::PixelType pixelValue = image->GetPixel(index);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas; color:blue">if</span><span style="font-size:9.5pt; font-family:Consolas">(pixelValue==255)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas">cout<<index[0]<<<span style="color:#A31515">" "</span> << index[1]<<endl;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> }</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas">}</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt; font-family:Consolas"> </span></p>
<p class="MsoNormal">Can anyone guide me to solve this.</p>
<p class="MsoNormal">Thank you,</p>
<p class="MsoNormal">Yamini.D</p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>
</font>
</body>
</html>